Re: glibmm thread safety
- From: Chris Vine <chris cvine freeserve co uk>
- To: gtkmm-list gnome org
- Cc: Daniel Elstner <daniel kitta googlemail com>
- Subject: Re: glibmm thread safety
- Date: Mon, 15 Jan 2007 12:24:55 +0000
On Monday 15 January 2007 01:32, Daniel Elstner wrote:
> Am Montag, den 15.01.2007, 00:57 +0000 schrieb Chris Vine:
[snip]
> > This works provided that the notifying objects are only constructed and
> > destroyed in the main loop thread. Unlike Glib::Dispatcher, my
> > implementation does not have this restriction but it is documented that
> > further synchronisation may be required IF they are constructed or
> > destroyed in other threads and object lifetime cannot be guaranteed.
>
> Well, you can have multiple main loops. I believe one of the glibmm
> threading examples actually does this.
If I come across a need for that, I was going to templatise the notifier class
with a tag type for each main context/main loop so that there would be a
separate pipe for each main context. It could still be useful though to be
able to create the notifier object in a different thread from the one in
which the slot will execute.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]