[c++-pthreads] Restating the Jason model
Dave Butenhof
David.Butenhof at hp.com
Wed Jan 14 13:04:06 UTC 2004
Alexander Terekhov wrote:
>Jason Merrill wrote:
>[...]
>
>
>>>Well, yes; although it also seems better to make one new rule for the new
>>>"thread terminating exceptions" rather than two separate new rules.
>>>
>>>
>>There's no way to use the same rules for both, since we can't re-assert
>>deferred exit.
>>
>>
>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.
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",
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.
--
/--------------------[ David.Butenhof at hp.com ]--------------------\
| Hewlett-Packard Company Tru64 UNIX & VMS Thread Architect |
| My book: http://www.awl.com/cseng/titles/0-201-63392-2/ |
\----[ http://homepage.mac.com/dbutenhof/Threads/Threads.html ]---/
More information about the c++-pthreads
mailing list