17 Feb
2007
17 Feb
'07
7:21 p.m.
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