Re: Is this a bug of GMainLoop?
- From: "Tor Lillqvist" <tml iki fi>
- To: "#YU KUAN#" <yukuan pmail ntu edu sg>
- Cc: gtk-devel-list gnome org
- Subject: Re: Is this a bug of GMainLoop?
- Date: Sat, 17 May 2008 05:49:35 +0300
> I will try your suggestion, too, and try to check whether it affects
> adversely the use patterns of GIOChannels and main loops in some other
> applications.
As far as I could see briefly testing, Yu's patch didn't have any ill
effects. I would love if more people could test it, though.
(There was a slight glitch in the context of the patch in Yu's
message, maybe a copy/paste error? I mean the line
"channel->last_events = 1;" which actually is "channel->last_events =
0;" in the source.)
Yu's patch, to *current* trunk giowin32.c (I just committed a change
that improved the G_IO_WIN32_DEBUG output a bit) is as follows. Please
test it, all who can. (It should be trivial to apply it manually to
the glib-2-16 branch, too.)
--tml
Index: glib/giowin32.c
===================================================================
--- glib/giowin32.c (revision 6898)
+++ glib/giowin32.c (working copy)
@@ -849,6 +849,13 @@
if (channel->debug)
g_print ("\n setting last_events=0");
channel->last_events = 0;
+
+ if ((event_mask & FD_WRITE) && !channel->write_would_have_blocked)
+ {
+ if (channel->debug)
+ g_print (" WSASetEvent(%#x)", watch->pollfd.fd);
+ WSASetEvent ((WSAEVENT) watch->pollfd.fd);
+ }
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]