! More...
#include <mitsuba/mitsuba.h>
Public Member Functions | |
| ThreadLocal () | |
| Construct a new thread local storage object. More... | |
| void | set (ValueType *ptr) |
| Update the data associated with the current thread. More... | |
| ValueType * | get () |
| Return a reference to the data associated with the current thread. More... | |
| const ValueType * | get () const |
| Return a reference to the data associated with the current thread (const version) More... | |
Static Protected Member Functions | |
| static void * | construct () |
| static void | destruct (void *data) |
Protected Attributes | |
| detail::ThreadLocalBase | m_base |
!
Thin wrapper around boost thread local storage. Stores references to Object instances.
This class implements a reference counting thread local storage object which captures references to subclasses of Object. In comparison to an API like boost::thread_specific_ptr it has a much nicer cleanup mechanism. Held references are destroyed when the owning thread dies or when the ThreadLocal instance is freed, whichever occurs first.
|
inline |
Construct a new thread local storage object.
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inline |
Return a reference to the data associated with the current thread.
|
inline |
Return a reference to the data associated with the current thread (const version)
|
inline |
Update the data associated with the current thread.
|
protected |