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 Thu, 2004-01-08 at 16:08, David Abrahams wrote:

> I think you missed something, or maybe the main thing.  C++ authors
> can already write thread-safe libraries.

I should have written "defered-cancel thread-safe" libraries.

> What I'm trying to achieve is to allow existing thread-safe library
> code that wasn't written with POSIX cancellations in mind to be used
> easily in a POSIX environment.

I missed that part. Reading again your emails, this becomes clear to me
now. The key here is the definition of "easily". From easiest to
hardest:
	1) disable cancelability in all threads by default

	2) enable cancelability in all new threads, make most standard library
functions (as well as the POSIX locking functions used by these
libraries) disable cancelation and throw cancelation exceptions from all
the other functions marked as cancelable by POSIX

	3) enable cancelability in all new threads, throw cancelation
exceptions from all other functions marked as cancelable by POSIX.

regards,
Mathieu
-- 
Mathieu Lacage <mathieu.lacage@xxxxxxxxxxxxxxx>