CS::Threading::ThreadLocalBase Class Reference
|typedef void(*||DestructorFn )(void *)|
|TLS value destructor function. |
Public Member Functions
|void *||GetValue () const|
|Get the TLS slot value for the current thread. Defaults to 0. |
|void||SetValue (void *data) const|
|Set the TLS slot value for the current thread. |
|ThreadLocalBase (DestructorFn dtor=0)|
|Create a TLS slot with the given destructor function. |
|Delete the TLS slot. |
Thread local storage of a pointer value (void*).
Wraps the platform-specific TLS details.
Optionally, a "destructor" function can be specified which is called when the thread exists and the TLS value for the thread is not null. Note it's called only on thread exit, not when the TLS slot itself is destroyed! (Essentially, the same as pthreads behaves.)
- Proper destructor function support is only guaranteed if CS' Thread facility is used.
Member Typedef Documentation
|typedef void(* CS::Threading::ThreadLocalBase::DestructorFn)(void *)|
Constructor & Destructor Documentation
|CS::Threading::ThreadLocalBase::ThreadLocalBase||(||DestructorFn|| dtor =
Create a TLS slot with the given destructor function.
Delete the TLS slot.
Member Function Documentation
Get the TLS slot value for the current thread. Defaults to 0.
|void CS::Threading::ThreadLocalBase::SetValue||(||void *||data||)||const|
Set the TLS slot value for the current thread.
The documentation for this class was generated from the following file:
Generated for Crystal Space 2.1 by doxygen 1.6.1