Honeycomb
0.1
Component-Model Framework
|
Local thread storage. Multiple threads can access one Local object, but each thread will only see its own separate "local" instance. More...
#include <Thread.h>
Public Types | |
typedef function< T *()> | Init |
typedef function< void(T *)> | Fin |
Public Member Functions | |
Local (const Init &init=[]{return new T();}, const Fin &fin=finalize< T >()) | |
Init / Finalize func is called once per thread to create/destroy local object instance. More... | |
~Local () | |
Local & | operator= (const T &rhs) |
Assign thread-local object to rhs. More... | |
operator const T & () const | |
operator T & () | |
const T * | operator-> () const |
T * | operator-> () |
const T & | operator* () const |
T & | operator* () |
const T & | get () const |
T & | get () |
Get the thread-local object. More... | |
Local thread storage. Multiple threads can access one Local object, but each thread will only see its own separate "local" instance.
typedef function<void (T*)> honey::thread::Local< T >::Fin |
typedef function<T* ()> honey::thread::Local< T >::Init |
honey::thread::Local< T >::Local | ( | const Init & | init = []{ return new T(); } , |
const Fin & | fin = finalize<T>() |
||
) |
Init / Finalize func is called once per thread to create/destroy local object instance.
honey::thread::Local< T >::~Local | ( | ) |
|
inline |
T & honey::thread::Local< T >::get | ( | ) |
Get the thread-local object.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assign thread-local object to rhs.