[c++-pthreads] Re: [SPAM] - Re: [c++-pthreads] Re: FW: RE: Re: I'm Lost - Email found in subject
Jason Merrill
jason at redhat.com
Tue Mar 14 21:53:45 UTC 2006
Ted Baker wrote:
> By the way, this is one (the main?) reason why the transition from normal
> to cancelled is one-way, and the effect of cancellation is not necessarily
> immediate. That way you can maintain consistency without a lock on the bit that
> says whether a thread is cancelled. Another thread can set the cancellation
> bit and the target thread some time later notices that the bit is set. Since
> the bit is never reset, there is no race condition.
This is the first justification I've seen for Ulrich's position. Can
you elaborate on how allowing us to reset the cancelled bit could lead
to a race condition?
Jason
More information about the c++-pthreads
mailing list