[gst-devel] "threadsafe" signals

Benjamin Otte in7y118 at public.uni-hamburg.de
Fri Jan 9 17:09:03 CET 2004


On Fri, 9 Jan 2004, Colin Walters wrote:

> On Fri, 2004-01-09 at 13:53, Benjamin Otte wrote:
>
> > 2) If the signal isn't emitted in a thread but from the main context, you
> > get a deadlock.
>
> That's easy to fix - just do something similar to what
> lib/rb-thread-helpers.c does.  Test if you're in the main thread, and if
> so just emit the signal directly.
>
I'd like to not limit it to the main thread only. Especially because this
allows to connect safely from any thread to any thread so you could even
use it in applications to connect to signals from library threads and
stuff like that.

Apart from that signal emissions from multiple threads isn't
supported by glib anyway (though we do it...).

Benjamin





More information about the gstreamer-devel mailing list