BEM++
2.0
|
Thread-safe wrapper of a lazily inititialised object. More...
#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/common/lazy.hpp>
Public Member Functions | |
Lazy (const Initializer &init) | |
T & | get () |
T & | operator* () |
T * | operator-> () |
Private Attributes | |
Initializer | m_init |
tbb::atomic< T * > | m_value |
Mutex | m_mutex |
Thread-safe wrapper of a lazily inititialised object.
T | Type of the stored object. |
Initializer | Type of a copy-constructible functor providing the member function std::auto_ptr<T> operator()() that will be used to construct the object the first time it is requested. |
Mutex | Type of the mutex to be used to lock the object during initialisation. |