Thread Local Storage implementation. More...
#include <Radiant/Thread.hpp>
Public Member Functions | |
| std::list< T > | all () const |
| Get all instances of the variable Returns a list of all instances of the TLS variable from different threads. More... | |
| T & | get () |
| Get the calling thread instance of the TLS variable. More... | |
| operator T & () | |
| Get the calling thread instance of the TLS variable. More... | |
| TLS< T > & | operator= (const T &t) |
| Assign the underlying value. More... | |
| void | setAll (const T &t) |
| Set all instances of the variable to the given value. More... | |
| TLS () | |
| Constructs TLS variable with default constructor. | |
| TLS (const T &t) | |
| Construct a TLS variable with the given default value. More... | |
| TLS (const TLS &t) | |
| Construct a copy. More... | |
Thread Local Storage implementation.
Do something like Radiant::TLS<int> foo = 5; and after that you can just use the foo as int
|
inline |
Construct a TLS variable with the given default value.
| t | default value |
|
inline |
Construct a copy.
| t | object to copy |
|
inline |
Get all instances of the variable Returns a list of all instances of the TLS variable from different threads.
|
inline |
Get the calling thread instance of the TLS variable.
|
inline |
Get the calling thread instance of the TLS variable.
|
inline |
|
inline |
Set all instances of the variable to the given value.
| t | value to set |