Re: g_io_add_watch, how to remove?



On 1 Aug 2001, Owen Taylor wrote:

> > The problem I experience is that the main loop (g_main) dispatches
> > activites on this closed channel/file descriptor and I realize that I
> > have forgotten to remove the watch on this channel from the main loop.
> > So, if anyone could enlightenme how to do that I would be glad. I have
> > looked in the glib manual and in the source without getting any insights
> > of how to do this.
> 
>  g_source_remove()

(admitting in shame) every once in a while, even i forget how to
remove a timeout/idle etc. function from the main loop ("even",
since i do have my share in the main loop implementation). so
i think we should take this as a strong hint to put an apropriate
comment into the header file for g_source_remove() (yes, it's
in the docs, but usually, i consult the docs way later than the
*.c files, and i'm probably not the only person doing that).

> 
> Regards,
>                                         Owen
> 

---
ciaoTJ





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