libhatchet
Loading...
Searching...
No Matches
hxthread_local< T > Class Template Reference

#include <hxthread.hpp>

Public Member Functions

 hxthread_local (void)
 ~hxthread_local ()
 operator T (void)
void operator= (T local_)

Detailed Description

template<typename T>
class hxthread_local< T >

hxthread_local - Provides thread-local storage for an integer or a pointer.

The default value must be zero or null. This class is available for compatibility when threading is off. The design has been simplified to avoid heap allocations and callbacks into the memory manager after the main thread exits.

Constructor & Destructor Documentation

◆ hxthread_local()

template<typename T>
hxthread_local< T >::hxthread_local ( void )
inlineexplicit

Construct to 0 or null.

◆ ~hxthread_local()

template<typename T>
hxthread_local< T >::~hxthread_local ( )
inline

Frees resources.

Member Function Documentation

◆ operator T()

template<typename T>
hxthread_local< T >::operator T ( void )
inline

Returns the thread-local value.

◆ operator=()

template<typename T>
void hxthread_local< T >::operator= ( T local_)
inline

Sets the thread-local value. This is a form of "mutable when const.".


The documentation for this class was generated from the following file: