[c++-pthreads] Restating the Jason model
Alexander Terekhov
boo at terekhov.de
Wed Jan 14 15:53:40 UTC 2004
Dave Butenhof wrote:
[...]
> >Sure there's a way to use the same rules for both. Get rid of re-assert
> >for cancellation.
> >
> And it can work the other way, too. It's just as easy to re-assert exit
> as cancel; instead of calling pthread_cancel() on the current thread
> when the cancel exception is destroyed, you call pthread_exit() when the
> exit exception is destroyed. You'd need to retain the original exit
> status (void*) value, but there's no reason that can't be part of the
> exit exception object.
Well, colliding auto-rethrow (when catch() exits with another throw)
aside for a moment, consider:
http://aspn.activestate.com/ASPN/Mail/Message/1153458
http://aspn.activestate.com/ASPN/Mail/Message/1156813
>
> Now, whether you WANT TO or SHOULD re-assert either condition is clearly
> a contentious issue and not likely to be resolved any any consensus
> soon. But either is technically feasible if it's decided to be correct
> and desirable.
>
> Just to restate, though; I DON'T think that re-asserting is "correct",
Agreed. It may seem tempting on the surface, but is totally incorrect.
> but at this time I'm willing to grant that given common practice within
> the STL and presumably application code, it may be necessary all the same.
Well, one thing is clear: this is the second time "sticky cancel" is
proposed. That idea was proposed first at boost about two years ago.
http://aspn.activestate.com/ASPN/Mail/Message/1156812
The trend, you know.
regards,
alexander.
More information about the c++-pthreads
mailing list