Lunchbox
1.16.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
|
Provides thread-local storage API used by PerThread and PerThreadRef. More...
#include <tls.h>
Public Types | |
typedef void(* | ThreadDestructor_t) (void *) |
Public Member Functions | |
TLS (ThreadDestructor_t dtorFunc) | |
Construct a new per-thread storage. More... | |
~TLS () | |
Destruct the per-thread storage. More... | |
void | set (const void *data) |
Set the data for this thread-local storage. More... | |
void * | get () |
const void * | get () const |
Provides thread-local storage API used by PerThread and PerThreadRef.
|
explicit |
Construct a new per-thread storage.
dtorFunc | the destructor function called to destroy thread-local storage, not called if 0. |
lunchbox::TLS::~TLS | ( | ) |
Destruct the per-thread storage.
void* lunchbox::TLS::get | ( | ) |
Referenced by lunchbox::PerThreadRef< T >::get(), lunchbox::PerThread< T, D >::get(), lunchbox::PerThreadRef< T >::getPointer(), lunchbox::PerThreadRef< T >::isValid(), lunchbox::PerThread< T, D >::isValid(), lunchbox::PerThreadRef< T >::operator!(), lunchbox::PerThread< T, D >::operator!(), lunchbox::PerThreadRef< T >::operator->(), and lunchbox::PerThread< T, D >::operator->().
const void* lunchbox::TLS::get | ( | ) | const |
void lunchbox::TLS::set | ( | const void * | data | ) |
Set the data for this thread-local storage.
Referenced by lunchbox::PerThreadRef< T >::operator=(), and lunchbox::PerThread< T, D >::operator=().