Replies: 1 comment 9 replies
-
None is the same as an infinite time.
If there are animations you probably want to spin your loop as fast as the screen can refresh. So not go to sleep and poll right away.
Since it all happen in the same thread, I think you can just call set_property and so on on the UI at any point |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building an app with splint on ESP32 with async.
For that I need to develop my own async event loop.
I've seen #2793 (comment) that sketches how an async event loop should look like, however several things I'm unsure about:
slint::platform::duration_until_next_timer_update()
(which returns anOption
) returns a None? Should I treat it as 0 or as infinite or something else?if window.has_active_animations()
which I understand needs to be considered as well. Whats the correct way to deal with this? While there are active animations should I poll the touch and callupdate_times_and_animations()
? Surely I need to call the draw but what's the proper way in an async app to deal with drawing together with polling touch and updating animations? I can't go into a blocking loop for sure (since other async elements in the app won't function).Beta Was this translation helpful? Give feedback.
All reactions