![]() |
Public API Reference |
![]() |
Thread local storage of arbitrary C++ objects. More...
#include <csutil/threading/tls.h>
Public Member Functions | |
bool | HasValue () const |
Checks whether an instance was ever created for the current thread. | |
operator T & () const | |
Access object for current thread (create, if necessary) | |
T & | operator* () const |
Access object for current thread (create, if necessary) | |
T * | operator-> () const |
Access object for current thread (create, if necessary) | |
ThreadLocal & | operator= (const T &other) |
Assign an instance to the object for the current thread (create, if necessary) |
Thread local storage of arbitrary C++ objects.
Stores an arbitrary object in a TLS slot, automatically creating an instance and destroying it when the thread exits.
bool CS::Threading::ThreadLocal< T >::HasValue | ( | ) | const [inline] |
CS::Threading::ThreadLocal< T >::operator T & | ( | ) | const [inline] |
T& CS::Threading::ThreadLocal< T >::operator* | ( | ) | const [inline] |
T* CS::Threading::ThreadLocal< T >::operator-> | ( | ) | const [inline] |
ThreadLocal& CS::Threading::ThreadLocal< T >::operator= | ( | const T & | other | ) | [inline] |