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 Idescribed.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?"