You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current events API is not enough to be able to have a GUI app that can both sit idle for minutes/hours when there are no new events as well as reacts to outside events not from the GUI. With the two current APIs you can:
poll_events(): Run a 60fps loop by first polling for events, then checking for outside events, then sleeping for 16ms. This gives you the correct behavior but has 60 wakeups per second which costs a bit of power.
wait_events(): Since it blocks the power issue is solved but there is then no way to react to other events.
The ideal API would be a form of wait_events() with a way to inject an artificial event from another thread so that it can be unblocked on demand. Maybe there's already a way of doing this?
The text was updated successfully, but these errors were encountered:
The current events API is not enough to be able to have a GUI app that can both sit idle for minutes/hours when there are no new events as well as reacts to outside events not from the GUI. With the two current APIs you can:
The ideal API would be a form of wait_events() with a way to inject an artificial event from another thread so that it can be unblocked on demand. Maybe there's already a way of doing this?
The text was updated successfully, but these errors were encountered: