forked from jhenstridge/asyncio-glib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
glib_selector: Only ever iterate the mainloop once
As it is right now, any python code that runs may modify the timeout that would be passed into the select() call. As such, we can only run a single mainloop iteration before the select() call needs to be restarted. Also, we cannot use g_source_set_ready_time, because GLib will always do a full mainloop iteration afterwards to ensure that all sources had a chance to dispatch. This is easy to work around though as we can use the prepare callback to pass the required timeout from python into the GLib main loop code. Note that with this we end up iterating the main context but we never actually run a GLib mainloop. Fixes: jhenstridge#3
- Loading branch information
Benjamin Berg
committed
Mar 17, 2021
1 parent
7d6db7f
commit 1d46e54
Showing
1 changed file
with
10 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters