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
{{ message }}
Repository navigation
EventsLoopProxy does not wakeup the EventsLoop unless it's already blocked #266
To get a non-polling multi-threaded app running the conrod examples do the following:
Create a rendering thread that reads inputs and writes it's output to a set of std::sync::mpsc channels
Block the main loop on EventsLoop::run_forever()
In the rendering thread whenever we have written the output use an EventsLoopProxy::wakeup() to wake up the main thread
Inside run_forever() pass on events to the channel until we get an Awakened
Finish the main loop by rendering from the second channel and go back to blocking in run_forever()
The problem with this setup is that step 3 doesn't reliably unblock run_forever() because if you use EventsLoopProxy::wakeup() when not inside run_forever() the next time run_forever() runs it will not immediately unblock.
Is this intended behavior? @mitchmindtree was expecting the semantics of wakeup() to be that if it's called it will unblock run_forever() immediately when it gets called and that does sound much more useful.
Activity
Osspial commentedon Apr 24, 2019
From skimming the conrod issue, this seems to be an issue with X11. @vberger - does the EL2.0 PR fix this?
elinorbgr commentedon Apr 24, 2019
It should yes. Whenever the event loop blocks, it blocks until an x11 event or an user event arrives, whichever comes first.
Merge next back to dev branch (rust-windowing#305)