[SPAM] - Re: [c++-pthreads] pthread_cancel and EH: let's try this again - Email found in subject

Ted Baker baker at cs.fsu.edu
Mon Jul 18 15:31:35 UTC 2005


On Mon, Jul 18, 2005 at 04:48:43PM +0300, Peter Dimov wrote:
> That's even more surreal.
> 
> C, a language that has no exceptions and no concept of exception safety, 
> enables programmers to use thread cancellation ...

But being able to do do something is not the same as being
able to do something safely.

> ... via a mechanism that is (admittedly) lifted from C++...

I don't know where you got that idea.  AFIK the mechanism predateds C++.

> ... but C++, a language with exceptions and almost a decade of experience 
> in exception safety declares cancellation unsafe and actively prohibits its 
> use?

Yes, because it is unsafe, and C++ wants to be safer than C.

> Responsible? 

Yes, this is the only responsible thing.  In C, thread
cancellation is difficult to use correctly, and usage is easily
broken when one composes a system out of modules/libraries written
by different individuals (possibly without access to sources).

--Ted








More information about the c++-pthreads mailing list