Re: What are the real issues?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What are the real issues?



Ted Baker <baker@xxxxxxxxxx> writes:

>>   (3) how to preserve the frankly enormous body of thread-safe code
>>       already written, deployed, and running for years.
>
> Just be be clear.  You mean by "thread-safe" that the code
> uses mutexes to protect access to shared data, but that it does
> not use cancellation state management and cleanup handlers
> to protect against thread cancellation.... right?
>
> If so, the only way out seems to be to require that for C++
> programs the initial cancellation state of every thread is
> *disabled*.
>
> If you do that, then no thread can be cancelled unless it
> contains a call to explicitly enable cancellation.

That unfortunately misses a great opportunity to allow thread-safe and
exception-neutral code to respond to cancellation requests without
modification.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com