Re: [c++-pthreads] Re: thread-safety definition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [c++-pthreads] Re: thread-safety definition



On Mon, 12 Jan 2004 08:41:39 -0500, Dave Butenhof <David.Butenhof@xxxxxx> wrote:
> Jason Merrill wrote:
>>On Fri, 09 Jan 2004 07:20:18 -0500, Dave Butenhof <David.Butenhof@xxxxxx> 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