Re: Threads



On Thu, 16 Dec 2004 02:47:50 +1100, Russell Shaw <rjshaw netspace net au> wrote:
So if g_main_loop_run() runs for the duration of the app, then there is nothing
guarding gdk calls made by gtk callbacks. So, doesn't this mean that every gtk
operation in a gtk callback that eventually calls a gdk function, should be
surrounded by gdk_threads_enter()/leave() ?

Callbacks that you register with widgets run outside the threads mutex,
so yes; you should protect gtk/gdk function calls with
gdk_threads_enter()/leave().

Cheers,
                                -Tristan



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