ACE 8.0.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ACE_Thread_ID Class Reference

Defines a platform-independent thread ID class. Note that this class should be defined within the scope of a thread, rather than at global scope! More...

#include <OS_NS_Thread.h>

Public Member Functions

 ACE_Thread_ID (ACE_thread_t thr_id, ACE_hthread_t thr_handle)
 
 ACE_Thread_ID ()
 Initialize the object using calls to ACE_OS::thr_self().
 
 ACE_Thread_ID (const ACE_Thread_ID &id)
 Copy constructor.
 
ACE_Thread_IDoperator= (const ACE_Thread_ID &id)
 Assignment operator.
 
ACE_thread_t id () const
 Get the thread id.
 
void id (ACE_thread_t)
 Set the thread id.
 
ACE_hthread_t handle () const
 Get the thread handle.
 
void handle (ACE_hthread_t)
 Set the thread handle.
 
void to_string (char *thr_string, size_t thr_string_len) const
 
template<size_t N>
void to_string (char(&thr_string)[N]) const
 
bool operator== (const ACE_Thread_ID &) const
 Equality operator.
 
bool operator!= (const ACE_Thread_ID &) const
 Inequality operator.
 

Private Attributes

ACE_thread_t thread_id_
 Identify the thread.
 
ACE_hthread_t thread_handle_
 Handle to the thread (typically used to "wait" on Win32).
 

Detailed Description

Defines a platform-independent thread ID class. Note that this class should be defined within the scope of a thread, rather than at global scope!

Constructor & Destructor Documentation

◆ ACE_Thread_ID() [1/3]

ACE_Thread_ID::ACE_Thread_ID ( ACE_thread_t thr_id,
ACE_hthread_t thr_handle )
inline

Initialize the object using the thread id and thread handle passed as parameters.

◆ ACE_Thread_ID() [2/3]

ACE_Thread_ID::ACE_Thread_ID ( )
inline

Initialize the object using calls to ACE_OS::thr_self().

◆ ACE_Thread_ID() [3/3]

ACE_Thread_ID::ACE_Thread_ID ( const ACE_Thread_ID & id)
inline

Copy constructor.

Member Function Documentation

◆ handle() [1/2]

ACE_hthread_t ACE_Thread_ID::handle ( ) const
inline

Get the thread handle.

◆ handle() [2/2]

void ACE_Thread_ID::handle ( ACE_hthread_t thread_handle)
inline

Set the thread handle.

◆ id() [1/2]

ACE_thread_t ACE_Thread_ID::id ( ) const
inline

Get the thread id.

◆ id() [2/2]

void ACE_Thread_ID::id ( ACE_thread_t thread_id)
inline

Set the thread id.

◆ operator!=()

bool ACE_Thread_ID::operator!= ( const ACE_Thread_ID & rhs) const
inline

Inequality operator.

◆ operator=()

ACE_Thread_ID & ACE_Thread_ID::operator= ( const ACE_Thread_ID & id)
inline

Assignment operator.

◆ operator==()

bool ACE_Thread_ID::operator== ( const ACE_Thread_ID & rhs) const
inline

Equality operator.

◆ to_string() [1/2]

void ACE_Thread_ID::to_string ( char * thr_string,
size_t thr_string_len ) const

◆ to_string() [2/2]

template<size_t N>
void ACE_Thread_ID::to_string ( char(&) thr_string[N]) const
inline

Member Data Documentation

◆ thread_handle_

ACE_hthread_t ACE_Thread_ID::thread_handle_
private

Handle to the thread (typically used to "wait" on Win32).

◆ thread_id_

ACE_thread_t ACE_Thread_ID::thread_id_
private

Identify the thread.


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