- cpp3ds
- ThreadLocal
Defines variables with thread-local storage. More...
#include <ThreadLocal.hpp>
Public Member Functions | |
ThreadLocal (void *value=NULL) | |
Default constructor. More... | |
~ThreadLocal () | |
Destructor. More... | |
void | setValue (void *value) |
Set the thread-specific value of the variable. More... | |
void * | getValue () const |
Retrieve the thread-specific value of the variable. More... | |
Defines variables with thread-local storage.
This class manipulates void* parameters and thus is not appropriate for strongly-typed variables.
You should rather use the cpp3ds::ThreadLocalPtr template class.
Definition at line 46 of file ThreadLocal.hpp.
cpp3ds::ThreadLocal::ThreadLocal | ( | void * | value = NULL | ) |
Default constructor.
value | Optional value to initalize the variable |
cpp3ds::ThreadLocal::~ThreadLocal | ( | ) |
Destructor.
void* cpp3ds::ThreadLocal::getValue | ( | ) | const |
Retrieve the thread-specific value of the variable.
void cpp3ds::ThreadLocal::setValue | ( | void * | value | ) |
Set the thread-specific value of the variable.
value | Value of the variable for the current thread |