Base Framework
Public Member Functions | List of all members
ThreadKey< TYPE > Class Template Reference

Thread local variable. More...

#include <base/concurrency/ThreadKey.h>

Inherits ThreadKeyImpl.

Public Member Functions

 ThreadKey ()
 
TYPE * getKey () const
 
void setKey (TYPE *value)
 

Detailed Description

template<class TYPE>
class ThreadKey< TYPE >

Thread local variable.

This class allows global and static variables to hold thread-specific data.

Version
1.2

Constructor & Destructor Documentation

◆ ThreadKey()

template<class TYPE >
ThreadKey< TYPE >::ThreadKey ( )
inline

Initializes the key object.

Member Function Documentation

◆ getKey()

template<class TYPE >
TYPE* ThreadKey< TYPE >::getKey ( ) const
inline

Returns the key.

◆ setKey()

template<class TYPE >
void ThreadKey< TYPE >::setKey ( TYPE *  value)
inline

Sets the key.

Parameters
valueThe desired value of the key for the executing thread.