Re: io watch callback and condition modification
- From: Owen Taylor <otaylor redhat com>
- To: Szalai Ferenc <szferi angel elte hu>
- Cc: gtk-list gnome org
- Subject: Re: io watch callback and condition modification
- Date: Mon, 15 Apr 2002 11:05:13 -0400 (EDT)
Szalai Ferenc <szferi angel elte hu> writes:
> Dear Owen,
> > Why can't you simply remove the watch and add a new one?
> Because for example the write watch will live only util I send the
> response. And because this was a good adventure to undrestand glib main
> loop and iochannel :)
> But lastly I solved the problem to set all bit in the condition of io
> channel and I just modifiy the evnet element of appropriate poll
> structure and it works fine.
If I understand what you are saying, you are doing something illegal.
You can not modify a GPollFD after you've added it to the event loop.
It might work now, it will very likely not work in the future.
> > Trying to handle mutation of an active source is probably going
> > add a fair bit of thread safety and reentrancy complexity.
> Where can I find any example for it?
We don't do it currently because it's complex :-)
] [Thread Prev