Re: g_threads_enter() equivalent



Dear Chris,

On Fri, 7 May 2010, Chris Vine wrote:

Mark Roberts <gtkmm manumark de> wrote:

[...] utility classes [...]

This is wrong.  gdk_threads_enter() and gdk_threads_leave() lock and
unlock the GDK global lock.  You cannot replace that with a mutex of
your own, because you cannot control what happens in main loop events
with such a mutex.  You have to use the lock which GDK uses,
namely its global lock.

Thanks for the clarification. I did not mean to say that gdk_threads_enter() and gdk_threads_leave() could be replaced by any of the utility classes mentioned in my post, but it may have seemed that that was what I meant.

I only meant that you can generally sink a pair of functions in a utility class so as not to forget calling one of them.

Mark


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