Boost logo

Boost Users :

Subject: Re: [Boost-users] thread-safe initialization for singleton
From: Kraus Philipp (philipp.kraus_at_[hidden])
Date: 2010-08-21 14:59:36

Am 21.08.2010 um 17:59 schrieb Mika Heiskanen:

> On Sat, 2010-08-21 at 15:58 +0300, Kraus Philipp wrote:
>> I have written a class with static methods and properties. Now the
>> class must be used in a multithreaded environment, so I get some race
>> conditions error.
>> I use boost::thread for implementating the threads. I have found
>> boost_once but I don't know how to use it, so my class properties are
>> initialized once.

I know Google and so I've found boost_once, but can you show me a
little example?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at