Re: multi-threaded apps.



"David Pickens" <dsp@rci.rutgers.edu> writes:

> This is why I have the system setup with pipes -- the only reason, really,
> to have the pipes is to allow the child thread to tell the parent thread to
> do something involving GTK+.  If the intent is to cleanup the code, it may
> (or may not) make sense to do this work, but probably only if you really are
> going to make balsa run exclusively with threads.  (Imagine the
> #ifdefs.)

In GLib (in HEAD at least) g_idle_add() is MT safe, since it expands to
g_source_add(), which locks a mutex called main_loop. 

The sanest way to do something involving GTK is to g_idle_add() a
function that does it and returns FALSE.





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