[c++-pthreads] Re: pthread_cancel and EH: let's try this again
Peter Dimov
pdimov at mmltd.net
Wed Jul 27 15:13:17 UTC 2005
Alexander Terekhov wrote:
> Peter Dimov wrote:
> [...]
>> "The cancelability state shall remain set to PTHREAD_CANCEL_DISABLE
>> until the thread has terminated. The behavior is undefined if a
>> cancellation cleanup handler or thread-specific data destructor
>> routine changes the cancelability state to PTHREAD_CANCEL_ENABLE."
>>
>> made it into the TC, it specifically prohibits the scenario I
>> described.
>
> Well, see
>
> http://www.opengroup.org/austin/mailarchives/austin-group-l/msg05987.html
Yep, it seems you beat me to it.
"To me, these bits are somewhat biased toward "don't catch-and-
finalize pthread_cancel_e exception" (pthread_exit_e aside for
a moment) and sort of "justifies" {current-}NTPL-like "forced
unwinding" silliness. I'm kinda surprised. I'd feel much better
if the final version would simply OMIT these bits... or, idealy
try to explain it in a way as close as possible to "the truth"
with catchable/finalizable exceptions and throw()-nothing dtors
(for cleanup handlers and thread-specific data destructor
routines). Oder?"
More information about the c++-pthreads
mailing list