mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-05 23:48:44 +02:00
Rework the g_poll() implementation on Windows to match poll() semantics
2008-08-21 Tor Lillqvist <tml@novell.com> * glib/gmain.c: Rework the g_poll() implementation on Windows to match poll() semantics more closely. This makes the test program in bug #468910 behave better and doesn't seem to break anything else. If polling several GPollFDs, i.e. messages and/or waitable handles, first check if one or several of them are in the signalled state right away, and return indication for all that are in that case. If not, then poll with timeout and indicate only the single one that the Win32 wait function tells us as before. Remove unnecessary ifdefs, as we always have G_MAIN_POLL_DEBUG defined on Windows. Initialise g_main_poll_debug in g_main_context_new() so we have it before testing it in one case. Don't add several copies of a handle in the array of handles to wait for. The documentation says this is not allowed, although it did seem to work fine in practise. But do as the documentations says anyway. svn path=/trunk/; revision=7375
This commit is contained in:
committed by
Tor Lillqvist
parent
0f7359d215
commit
605682521b
26
ChangeLog
26
ChangeLog
@@ -1,3 +1,29 @@
|
||||
2008-08-21 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* glib/gmain.c: Rework the g_poll() implementation on Windows to
|
||||
match poll() semantics more closely. This makes the test program
|
||||
in bug #468910 behave better and doesn't seem to break anything
|
||||
else.
|
||||
|
||||
If polling several GPollFDs, i.e. messages and/or waitable
|
||||
handles, first check if one or several of them are in the
|
||||
signalled state right away, and return indication for all that are
|
||||
in that case.
|
||||
|
||||
If not, then poll with timeout and indicate only the single one
|
||||
that the Win32 wait function tells us as before.
|
||||
|
||||
Remove unnecessary ifdefs, as we always have G_MAIN_POLL_DEBUG
|
||||
defined on Windows.
|
||||
|
||||
Initialise g_main_poll_debug in g_main_context_new() so we have it
|
||||
before testing it in one case.
|
||||
|
||||
Don't add several copies of a handle in the array of handles to
|
||||
wait for. The documentation says this is not allowed, although it
|
||||
did seem to work fine in practise. But do as the documentations
|
||||
says anyway.
|
||||
|
||||
2008-08-20 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Bug 500246 - Bug fixes for giowin32
|
||||
|
Reference in New Issue
Block a user