[c++-pthreads] Re: thread-safety definition
Jason Merrill
jason at redhat.com
Mon Jan 12 18:23:22 UTC 2004
On Mon, 12 Jan 2004 08:41:39 -0500, Dave Butenhof <David.Butenhof at hp.com> wrote:
> Jason Merrill wrote:
>>On Fri, 09 Jan 2004 07:20:18 -0500, Dave Butenhof <David.Butenhof at hp.com> wrote:
>>>Besides, "reasserting cancel" in all the right places and no other places
>>>sounds like one of those projects that ends up being a lot more subtle
>>>and error-prone than anyone ever expects. ;-)
>>>
>>Assuming support for abanoning the cancel, why would it be more complex than
>> pthread_cancel (pthread_self ());
>>
> While I didn't have anything specific in mind, just a general concern, one
> example that occurs to me is "catch(...) {...; throw;}". One must be
> careful about specifying the "cancelled" state of the thread here; it
> shouldn't be possible to consider the exception destroyed during the body
> of the catch prior to the re-throw.
That shouldn't be a problem; a C++ exception is not destroyed until the
last active handler for that exception exits other than with a rethrow.
Jason
More information about the c++-pthreads
mailing list