Boost logo

Boost Users :

From: Timmo Stange (ts_at_[hidden])
Date: 2007-02-17 14:21:44


Timmo Stange wrote:

> The localConnectionBodies is a shared pointer to the actual
> slot list and not a full copy, so I don't understand how this
> is going to be thread-safe against concurrent invocations. The
> mutex is released after this compound statement and the
> invocation traverses a list that might be modified by the
> "nolock_cleanup_connections(false);" in a concurrent call to
> the same function.

Sorry, I missed the use_count() check even though I quoted it ;).
So concurrent invocation was a bad example, but what about other
concurrent modifications of the slot container, like connect()?

Another thing: The original signal is safe against deletion from
a slot invocation context. That's why it uses pimpl-Idiom.

Regards

Timmo Stange


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net