mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
W32: Do not ignore short waits in g_poll
Do the actual wait dance even if wait timeout is < 10ms. Otherwise we might busyloop. https://bugzilla.gnome.org/show_bug.cgi?id=764415
This commit is contained in:
parent
55ab3af098
commit
210a9796f7
@ -303,12 +303,9 @@ g_poll (GPollFD *fds,
|
||||
|
||||
/* If not, and we have a significant timeout, poll again with
|
||||
* timeout then. Note that this will return indication for only
|
||||
* one event, or only for messages. We ignore timeouts less than
|
||||
* ten milliseconds as they are mostly pointless on Windows, the
|
||||
* MsgWaitForMultipleObjectsEx() call will timeout right away
|
||||
* anyway.
|
||||
* one event, or only for messages.
|
||||
*/
|
||||
if (retval == 0 && (timeout == INFINITE || timeout >= 10))
|
||||
if (retval == 0 && (timeout == INFINITE || timeout > 0))
|
||||
retval = poll_rest (poll_msgs, handles, nhandles, fds, nfds, timeout);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user