DUNE: Uniform Navigational Environment  2019.02.1
DUNE::Concurrency::TLS< T > Class Template Reference

Detailed Description

template<typename T>
class DUNE::Concurrency::TLS< T >

Typed thread key.

Public Member Functions

 TLS ()
 
T & value (void)
 
void clear (void)
 
TLS< T > & operator= (const T &v)
 
T & operator* (void)
 

Constructor & Destructor Documentation

template<typename T >
DUNE::Concurrency::TLS< T >::TLS ( )
inline

Constructor.

Note: it passes base class with proper destruction method.

Member Function Documentation

template<typename T >
void DUNE::Concurrency::TLS< T >::clear ( void  )
inline

Clear datum that is allocated for calling thread.

References DUNE::Concurrency::RawTLS::set().

template<typename T >
T& DUNE::Concurrency::TLS< T >::operator* ( void  )
inline
template<typename T >
TLS<T>& DUNE::Concurrency::TLS< T >::operator= ( const T &  v)
inline
template<typename T >
T& DUNE::Concurrency::TLS< T >::value ( void  )
inline

Get a datum that is allocated for calling thread only.

Previously allocated value is returned, or a new one is created first time round.

References DUNE::Concurrency::RawTLS::get(), and DUNE::Concurrency::RawTLS::set().

Referenced by DUNE::Concurrency::TLS< T >::operator*(), and DUNE::Concurrency::TLS< T >::operator=().

Collaboration diagram for DUNE::Concurrency::TLS< T >:
Collaboration graph