mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-10 23:00:07 +02:00
Bug 525192 - 100% CPU if run main loop with no IO sources
2008-03-31 Tor Lillqvist <tml@novell.com> Bug 525192 - 100% CPU if run main loop with no IO sources * glib/gmain.c (g_poll) [Win32]: Patch by Neil Roberts. svn path=/trunk/; revision=6787
This commit is contained in:
parent
a07b747200
commit
3e877f984e
@ -1,3 +1,9 @@
|
|||||||
|
2008-03-31 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
Bug 525192 - 100% CPU if run main loop with no IO sources
|
||||||
|
|
||||||
|
* glib/gmain.c (g_poll) [Win32]: Patch by Neil Roberts.
|
||||||
|
|
||||||
2008-03-30 Matthias Clasen <mclasen@redhat.com>
|
2008-03-30 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gtester.c: Don't use ARG_MAX. (#522335, patch by
|
* glib/gtester.c: Don't use ARG_MAX. (#522335, patch by
|
||||||
|
10
glib/gmain.c
10
glib/gmain.c
@ -383,8 +383,14 @@ g_poll (GPollFD *fds,
|
|||||||
}
|
}
|
||||||
else if (nhandles == 0)
|
else if (nhandles == 0)
|
||||||
{
|
{
|
||||||
/* Wait for nothing (huh?) */
|
/* No handles to wait for, just the timeout */
|
||||||
return 0;
|
if (timeout == INFINITE)
|
||||||
|
ready = WAIT_FAILED;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Sleep (timeout);
|
||||||
|
ready = WAIT_TIMEOUT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user