Provides thread-local storage API used by PerThread and PerThreadRef.
More...
#include <tls.h>
|
typedef void(* | ThreadDestructor_t) (void *) |
|
|
| 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.
Definition at line 29 of file tls.h.
lunchbox::TLS::TLS |
( |
ThreadDestructor_t |
dtorFunc | ) |
|
|
explicit |
Construct a new per-thread storage.
- Parameters
-
dtorFunc | the destructor function called to destroy thread-local storage, not called if 0. |
- Version
- 1.7.2
Destruct the per-thread storage.
- Version
- 1.7.2
void* lunchbox::TLS::get |
( |
| ) |
|
const void* lunchbox::TLS::get |
( |
| ) |
const |
- Returns
- the data for this thread-local storage.
- Version
- 1.7.2
void lunchbox::TLS::set |
( |
const void * |
data | ) |
|
Set the data for this thread-local storage.
- Version
- 1.7.2
The documentation for this class was generated from the following file: