Re: Race condition during Dispatcher deconstruction



Hi,

Am Dienstag, den 08.01.2008, 01:25 +0000 schrieb Chris Vine:

> Ah, it is in glibmm-2.6 that I have a tarball of here.  That method is
> invoked in the destructor of Glib::DispatchNotifier, because in that
> version of glibmm, Glib:DispatchNotifier is not derived from
> sigc::trackable.  However that is not going to save you (any more than
> sigc::trackable will) because as I have mentioned the
> Glib::DispatchNotifier object appears to be a thread-local static
> object, shared between all Glib::Dispatcher objects created in that
> thread.

Indeed it is, and has been that way since the initial implementation if
I remember correctly. You are also correct about sigc::trackable vs
explicit disconnection; the change doesn't have any user-visible effect.

If I recall correctly we already had an exchange on the list about this
very topic a while ago. I'll have to look it up, but from memory I think
I didn't want to move to your alternative implementation because some of
the design goals of Glib::Dispatcher would have had to be sacrificed; in
particular the avoidance of mutex locking during normal operation.

--Daniel




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