On Tue, 27 Jul 2010 12:06:40 +0200 klaus triendl <[email protected]> wrote: > Krzysztof Kosiński schrieb: > > Hello > > > > gtkmm 3.0 is the only chance we have in near future to fix two > > really bad issues in libsigc++: > > 1. sigc::trackable is not threadsafe. > > For what exactly do you need a threadsafe sigc::trackable? > > You can take a look at sigx++ for threadsafe interthread > communication, which also allows for connecting to/disconnecting from > signals in a threadsafe manner.
The proposal is not (I think) about replacing Glib::Dispatcher or making new provision for inter-thread communication via main loops. The problem with sigc::trackable is that because the slot container is not thread safe, once one thread has created a slot representing a non-static method of an object deriving sigc::trackable, no other thread can create a slot for any other method of the object. It would be nice if signals were themselves thread safe, but the fact that sigc::trackable is not thread safe is a major constraint in the use of libsigc++ in multi-threaded programs. Having said that, the documentation on sigx++ is quite limited so I am not sure to what extent it provides thread-safe intra-thread operation (which is what we are talking about) rather than inter-thread operation (which is what the sigx++ home page seems to major on) with reasonable speed and efficiency. Does sigx++ normally send everything through a main loop? Chris _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
