6 Feb
2015
6 Feb
'15
6:06 p.m.
On 02/06/2015 06:45 PM, Joren Heit wrote:
One thing I don't quite grasp yet, is the following. Suppose one thread disconnects a slot while another fires a signal connected to that slot. You say that the implementation must make sure that the signal is not fired after the disconnect-call returns. But won't this be undefined behaviour, as there is no way of knowing which will grab the lock first?
The easiest solution would be to store the slot as a shared_ptr, and make a copy of it (pin it) each time you call the slot.