Re: gdk threads ...

On Wed, 25 Apr 2012 09:05:47 -0400
Paul Davis <paul linuxaudiosystems com> wrote:
> On Wed, Apr 18, 2012 at 6:24 AM, Michael Meek
> <michael meeks suse com> wrote: [... ]
> there seems to be some confusion here. I've read back over your posts
> in the this thread. I don't see you mentioning libreoffice doing
> anything that requires thread enter/leave calls. You've mentioned idle
> callbacks, timeout callbacks. Idle callbacks can be setup without any
> thread locking (g_idle_add() and its cousins are probably the one
> actually thread safe thing in glib/gtk :). If you want separate
> threads with tie own main event loops (and, for example, their own
> timeouts) then you can do that, again with any thread enter/leave
> calls (ardour these days runs 3-4 glib event loops, for example). If
> you want other threads to be able to set up timeout callbacks in the
> GUI event loop, then just use g_idle_add() to get them set up.

That's interesting - you have found with Ardour that attaching timeout
sources to a main loop is not thread safe?

If so, you ought to file a bug about that if you haven't already done
so: it would be hard to make timeout sources not thread safe if
g_idle_add() is thread safe, and I have never encountered that
problem.  (I am  talking about glib thread safety, and not glibmm - I
know that attaching timeouts with the glibmm wrapper has had thread
safety issues because of libsigc++, but so has attaching idle sources.)


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