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:
Руслан Ижбулатов 2016-04-28 14:21:17 +00:00
parent 55ab3af098
commit 210a9796f7

View File

@ -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