[c++-pthreads] thread-safety definition
Matt Austern
austern at apple.com
Thu Jan 8 17:45:34 UTC 2004
On Jan 8, 2004, at 7:06 AM, Dave Butenhof wrote:
> Alexander Terekhov wrote:
>
>> Dave Butenhof wrote:
>> [...]
>>
>>> Nevertheless, async cancel CAN be used safely if you're careful,
>>> without
>>> disrupting ...
>>> ^^^^^^^
>>>
>> ^^^^^^^^^^
>>
>> Right.
>>
>>> Introducing asynchronous exceptions into C++ would be pointlessly
>>> disruptive ... ^^^^^^^^^^^
>>>
>> ^^^^^^^^^^
>>
>> And that's the phobia hits DRB again.
>>
> Several insults come to mind, but I'll bite my tongue. Alexander,
> you're either deliberately misusing, or just misunderstand, that word.
> Try looking it up in an English dictionary. Then try using it in a
> sentence where it actually belongs. After that, perhaps we can get
> back to talking about cancel and exceptions.
I'm almost willing to accept the word "phobia" to describe my own
feelings about asynchronous cancellation in C++. Both as a user and as
a compiler implementer, I'm very scared of asynchronous reporting
mechanisms in C++. (This is one reason that I've always resisted any
attempts to allow throwing an exception from a signal handler, for
example.) I have some idea of what kind of review you'd need to make
sure that user code is safe in the presence of asynchronous abnormal
code paths, and what kinds of things you'd need to do in the compiler
to make it reliable, and I have severe doubts that I could do either of
those things correctly except in really rare cases.
I think we're going to have enough trouble on this list coming to
consensus about how C++ should handle POSIX deferred cancellation.
Asynchronous cancellation is even harder. Let's leave it for another
day.
--Matt
More information about the c++-pthreads
mailing list