Gottlob Frege wrote:
On 2/19/07, Frank Mori Hess
wrote: Yes, I think the strong disconnect() guarantee will also guarantee the deadlock you outlined earlier with two slots attempting to disconnect each other will always be possible.
I think the strong guarantee is much more important. If I say disconnect() I really don't expect calls after that.
Does this imply that concurrent invocations are implicitly serialized at slot level? This guarantee makes sense for a use pattern where one has X * px = new X; and bind(&X::f, px) as a slot. Now thread 1 calls the signal and thread 2 disconnects the slot and immediately issues a delete px after that. I wouldn't have written the code in such a way, though. A shared_ptr<X> as px would work regardless of whether disconnect() guaranteed no calls after return.