From 210a9796f78eb90f76f1bd6a304e9fea05e97617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Thu, 28 Apr 2016 14:21:17 +0000 Subject: [PATCH] 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 --- glib/gpoll.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/glib/gpoll.c b/glib/gpoll.c index adc67820a..ffc959d21 100644 --- a/glib/gpoll.c +++ b/glib/gpoll.c @@ -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