Boost logo

Boost :

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


Hi,
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?

regards,
Oliver

-- 
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 ¿/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a















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