GNOME Bugzilla – Bug 337991
G_IO_OUT is not triggered when registered in timeout event handler
Last modified: 2006-04-11 14:45:44 UTC
When calling g_io_add_watch watching for G_IO_OUT on a socket in a timeout event handler the IO_OUT event is not triggered until the next wakeup of the main event loop. The problem can easily be workarounded by adding an idle watch after having called g_io_add_watch. The problem does only occur on my Windows XP based system, not on the GNU/Linux one. I originally registered this issue in a GTK+ based application where a single mouse motion event caused the IO_OUT to be triggered, so I guess it is enough to wake up the main loop (as the idle workaround does). The problem could be reproduced with Glib 2.8.x and Glib CVS HEAD. A simple testcase to reproduce the problem is attached to this bug report. I left out error checking to keep the example small and simple.
Created attachment 63175 [details] Simple testcase
This looks a lot like bug 331214 *** This bug has been marked as a duplicate of 331214 ***