A primitive to provide Thread Local Storage functionality for a first-citizen class.
More...
#include <thread.h>
template<typename T>
class lass::util::ThreadLocalVariable< T >
A primitive to provide Thread Local Storage functionality for a first-citizen class.
- requirements: T must be copyconstructible.
- Warning
- On Win32 platform, you should access a ThreadLocalVariable inside code running from a util::Thread (or util::threadFun for that matter). This is because the destructor of the variable will only be called on exit of a util::Thread. If you access it from any other thread (even the main thread), the variable will correctly constructed for that thread, but it will never be destructed! On a POSIX platform, this is not a problem though! The destructor will always be called.
Definition at line 270 of file thread.h.
The documentation for this class was generated from the following file: