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



Ross Smith wrote:
[...]
> I'm beginning to get the same worried feeling Wil Evers expressed a few
> messages back. It sounds as though a lot of people are seriously
> considering the idea of allowing exceptions to escape from destructors.
> 
> Dave, while I have the greatest respect for your knowledge and

Hey Ross, Dave wrote:

"One of those idle thoughts was that the concept of "cancel state" 
 (enable or disable) might even be meaningless (or at least irrelevant) 
 for a pure C++ binding. This might simply be a dynamic property of the 
 current call tree; depending on the nested throw specs. 
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> understanding of threads, I think the above shows that you don't really
> understand C++. Please try to understand that it is _absolutely vital_
> that destructors never be allowed to throw under any circumstances. If

Then why don't you complain that destructors are allowed to throw 
anything by default instead of having implicit throw() ("by default")
ES/throw spec. imposed on them? 

> a destructor calls a function that may throw some unknown exception (a
> very common case, especially in template classes whose destructors will
> often call member functions of some arbitrary user-supplied type), the
> call _must_ be wrapped in a catch-and-discard-all block. 

Not really.

regards,
alexander.