Boost logo

Boost :

Subject: [boost] [thread] thread-safe static local
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2009-03-03 03:09:49

I need a function 'get_default_X()' returning a reference to a singleton in a multithreaded env.
I choosed Scott Meyers singleton pattern (static local) together with boost::call_once().
My this be a reasonable, threadsafe implementation?


Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 ¿/mtl.!*

Boost list run by bdawes at, gregod at, cpdaniel at, john at