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



Fergus Henderson wrote:
> 
> On 13-Jan-2004, Alexander Terekhov <boo@xxxxxxxxxxx> wrote:
> > Ted Baker wrote:
> > > On Mon, Jan 12, 2004 at 07:19:42PM +0100, Alexander Terekhov wrote:
> > > > Now, in your model with cancellation ALWAYS disabled while running
> > > > destructors (not only when acting upon a cancel request delivery...
> > > > thread_exit aside for a moment), I'd have to add enable/disable RAII
> > >
> > > Please translate "RAII" for me?
> >
> > http://www.terekhov.de/DESIGN-futex-CV.cpp
> 
> Alexander Terekhov again fails to communicate,
> and when pressed substitutes a unrelated URL.

Related URL.

> 
> Ted, when he says "RAII", he means "Resource Acquision is Initialization".

To me, this doesn't say much at all in the context of enabling/disabling 
and/or disabling/enabling cancellation via "RAII guard objects". The link 
OTOH does illustrate it (e.g. see "class cancel_off_guard").

> This is the name of a C++ idiom where code which acquires/releases
> a resource is implemented as the constructor/destructor of a local object.

http://www.artima.com/intv/modern3.html

regards,
alexander.