Re: Is this a bug of GMainLoop?



Hi,

Am Mittwoch, den 14.05.2008, 09:34 +0800 schrieb #YU KUAN#:
> At this point G_IO_OUT is surely ok, the mainloop thread returns from
> poll and sends one byte to server in callback.
> 
> Then the program watches for G_IO_IN. mainloop thread will block.
> 
> Then the program sleeps for a while, and watches for G_IO_OUT.
> 
> Here, I wish the mainloop thread to return from poll with G_IO_OUT
> event.
> 
> However, mainloop will block instead of returning from poll.
> 
>  
> 
> I think the problem is FD_WRITE will not signaled again until send
> returns WSAEWOULDBLOCK on windows.
> 
> Is this a bug of GMainLoop?

Absolutely not; this is a bug in your code (more exactly a missing call
to g_io_channel_set_flags()); check the documentation for proper usage
of this function.

Also, application development questions should be raised on
gtk-app-devel-list (and think of the vast amount of gtk+ based software
out there, it's quite unlikely that you hit a massive bug like this).

Regards,
  Sven

-- 
Sven Herzberg
Imendio AB - Expert solutions in GTK+
http://www.imendio.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]