change condition on io_watch
- From: Christoph Simon <ml133 netpole com br>
- To: gtk-app-devel-list gnome org
- Subject: change condition on io_watch
- Date: Fri, 2 Dec 2005 09:08:57 -0200
Hi,
I'm trying to write a gtk+ program which is chatting with a server
while allowing the user to do other things. Initially I'm using
g_io_add_watch() which works fine while waiting for read and write
events. The problem is, that the server is always write-ready, thus,
even if I don't want to write anything yet, the callback is executed
immediately, bogging down the performance of the GUI. The only way I
found, is to g_source_remove() and g_io_add_watch() again each time
which can happen thousands of times right away as well as only once
after hours. Isn't there a possibility to just change the condition?
Thanks for any advice,
--
chri
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]