Boost logo

Boost :

Subject: Re: [boost] [Boost.utility]
From: Andrew Chinkoff (achinkoff_at_[hidden])
Date: 2010-01-27 13:55:31


Frank Mori Hess wrote:

> You should use boost::once to initialize the singleton object.

Does boost::once ensure that called function will be performed atomically?

That is what I mean:

A* pa = NULL;
void foo(){ pa = new A(); }
boost::call_once(foo, flag);

Question: Is it true that "pa" will be allocated atomically?

Best,
Andrew.

-- 
View this message in context: http://old.nabble.com/-Boost.utility--tp27309940p27344908.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk