bertram.felgenhauer at googlemail.com
Tue Sep 10 22:44:14 CEST 2013
Simon Marlow wrote:
> On 28/07/13 14:36, Roman Cheplyaka wrote:
> >The documentation for throwTo says:
> > throwTo does not return until the exception has been raised in the
> > target thread. The calling thread can thus be certain that the target
> > thread has received the exception. This is a useful property to know
> > when dealing with race conditions: eg. if there are two threads that
> > can kill each other, it is guaranteed that only one of the threads
> > will get to kill the other.
> >I don't see how the last sentense follows. I understood it so that the
> > throwTo has returned => exception has been delivered
> >is true, but not the reverse. If my understanding is correct, then both
> >exceptions could be delivered without any of throwTos returning.
> Perhaps this needs to be clarified.
How about the attached patch?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1319 bytes
Desc: not available
More information about the Libraries