C12Adapter Opensource C++ Interface
MThreadCurrent Class Reference

Thread instance that attaches to the current thread to allow manipulations with the thread parameters. More...

Inheritance diagram for MThreadCurrent:

Public Member Functions

 MThreadCurrent ()
 Creates object and immediately attaches it to the current thread. More...
 
virtual ~MThreadCurrent ()
 Destroys the current thread object, but does not influence the actual thread itself.
 
- Public Member Functions inherited from MThread
virtual ~MThread ()
 Destructor, destroys the thread object.
 
unsigned long GetThreadId () const
 Get thread identifier, a number that is guaranteed to be unique per thread.
 
InternalHandleType GetInternalHandle () const volatile
 Get thread handle, operating system dependent thread object manipulator.
 

Static Public Member Functions

static MThreadCurrentGetMain ()
 Access the main thread, static and global method.
 
static unsigned long GetStaticCurrentThreadId ()
 Static version of current thread identifier, unique per machine. More...
 
static InternalHandleType GetStaticCurrentThreadInternalHandle ()
 Static version of current thread handle property. More...
 
- Static Public Member Functions inherited from MThread
static void Relinquish ()
 Release the rest of our time slice letting the other threads run.
 

Additional Inherited Members

- Protected Member Functions inherited from MThread
 MThread (InternalHandleType thread=0)
 Operating system dependent internal handle type. More...
 
- Protected Attributes inherited from MThread
volatile InternalHandleType m_thread
 Thread handle.
 

Detailed Description

Thread instance that attaches to the current thread to allow manipulations with the thread parameters.

The majority of the functionality is achieved with MThread parent services.

It is recommended that there is only one thread object created per actual thread.

Constructor & Destructor Documentation

MThreadCurrent::MThreadCurrent ( )

Creates object and immediately attaches it to the current thread.

Precondition
System resources and security settings should allow for this operation to succeed, otherwise a number of system errors will be thrown.

Member Function Documentation

static unsigned long MThreadCurrent::GetStaticCurrentThreadId ( )
inlinestatic

Static version of current thread identifier, unique per machine.

This is a shortcut for MThreadCurrent::GetThreadId.

static InternalHandleType MThreadCurrent::GetStaticCurrentThreadInternalHandle ( )
inlinestatic

Static version of current thread handle property.

This is a shortcut for MThreadCurrent::GetInternalHandle.