rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWThreadManager Class Reference
[Threading]

Attempts orderly thread shutdown at process exit. More...

#include <rw/thread/RWThreadManager.h>

Inheritance diagram for RWThreadManager:
RWHandleBase

List of all members.

Public Member Functions

 RWThreadManager ()
 RWThreadManager (RWStaticCtor)
 RWThreadManager (const RWThreadManager &second)
 ~RWThreadManager ()
RWThreadManageroperator= (const RWThreadManager &second)
void enableEarlyShutdown ()
unsigned long getCancelTimeOut () const
int getTerminationSignal () const
bool getShutdownEnabled () const
void setCancelTimeOut (unsigned long milliseconds)
void setTerminationSignal (int termSignal)
void setShutdownEnabled (bool shutdownEnabled)

Static Public Member Functions

static RWThreadManager instance ()

Protected Member Functions

RWThreadManagerImp & body (void) const

Related Functions

(Note that these are not member functions.)



RWThreadManager rwThreadManager ()

Detailed Description

RWThreadManager attempts orderly thread shutdown at process exit.

Note:
This class uses reference semantics in which an instance of this class represents a reference to an implementation class.

Constructor & Destructor Documentation

RWThreadManager::RWThreadManager (  ) 

Constructs an empty, invalid handle instance.

RWThreadManager::RWThreadManager ( RWStaticCtor   ) 

Constructor that creates a global static RWThreadManager handle object that may be assigned to before it is constructed. This constructor does not change the static instance.

RWThreadManager::RWThreadManager ( const RWThreadManager second  ) 

Binds a new handle to the runnable instance, if any, pointed to by the handle second.

RWThreadManager::~RWThreadManager (  )  [inline]

Public destructor.


Member Function Documentation

RWThreadManagerImp& RWThreadManager::body ( void   )  const [protected]

Gets a reference for the body instance, if any.

Exceptions:
RWTHRInvalidPointer Thrown if this handle is not attached to a body.

Reimplemented from RWHandleBase.

void RWThreadManager::enableEarlyShutdown (  ) 

Allows the thread manager to clean up threads at program exit, but before destruction of objects with static storage duration.

unsigned long RWThreadManager::getCancelTimeOut (  )  const

Retrieves the number of milliseconds to wait for a thread to service a cancellation request before attempting to forcibly terminate it.

bool RWThreadManager::getShutdownEnabled (  )  const

Retrieves the value of the shutdown-enabled flag. If the flag is set, the thread manager attempts to force all threads to exit before the program terminates.

int RWThreadManager::getTerminationSignal (  )  const

Retrieves the signal to use to terminate a thread.

Condition:
This function is available only when using Solaris threads.
static RWThreadManager RWThreadManager::instance (  )  [static]

Creates and/or gets the current singleton thread manager instance.

RWThreadManager& RWThreadManager::operator= ( const RWThreadManager second  ) 

Assignment operator. Binds the handle to the same threaded runnable, if any, pointed to by second.

void RWThreadManager::setCancelTimeOut ( unsigned long  milliseconds  ) 

Sets the number of milliseconds to wait for a thread to service a cancellation request before attempting to forcibly terminate it.

void RWThreadManager::setShutdownEnabled ( bool  shutdownEnabled  ) 

Sets the value of the shutdown-enabled flag. If the flag is set, the thread manager attempts to force all threads to exit before the program terminates.

void RWThreadManager::setTerminationSignal ( int  termSignal  ) 

Sets the signal used to terminate threads.

Condition:
This function is available only when using Solaris threads.

Friends And Related Function Documentation

RWThreadManager rwThreadManager (  )  [related]

Creates and/or gets the current singleton thread manager instance. A call to this function may result in the construction of the thread manager if it has not yet been created.

See also:
RWThreadManager, RWThreadManager::instance()
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.