[glib] W32: Do not ignore short waits in g_poll
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] W32: Do not ignore short waits in g_poll
- Date: Thu, 28 Apr 2016 14:26:41 +0000 (UTC)
commit 210a9796f78eb90f76f1bd6a304e9fea05e97617
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Thu Apr 28 14:21:17 2016 +0000
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 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/glib/gpoll.c b/glib/gpoll.c
index adc6782..ffc959d 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]