SourcePro® C++ API Reference Guide

Product Documentation:
   SourcePro C++
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Related Functions
RWThreadManager Class Reference

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

#include <rw/thread/RWThreadManager.h>

Inheritance diagram for RWThreadManager:
RWHandleBase

Public Member Functions

 RWThreadManager ()
 
 RWThreadManager (RWStaticCtor)
 
 RWThreadManager (const RWThreadManager &second)
 
 ~RWThreadManager ()
 
void enableEarlyShutdown ()
 
unsigned long getCancelTimeOut () const
 
bool getShutdownEnabled () const
 
int getTerminationSignal () const
 
RWThreadManageroperator= (const RWThreadManager &second)
 
void setCancelTimeOut (unsigned long milliseconds)
 
void setShutdownEnabled (bool shutdownEnabled)
 
void setTerminationSignal (int termSignal)
 
- Public Member Functions inherited from RWHandleBase
bool isValid (void) const
 
bool operator!= (const RWHandleBase &second) const
 
bool operator< (const RWHandleBase &second) const
 
bool operator== (const RWHandleBase &second) const
 

Static Public Member Functions

static RWThreadManager instance ()
 

Related Functions

(Note that these are not member functions.)

RWThreadManager rwThreadManager ()
 

Additional Inherited Members

- Protected Member Functions inherited from RWHandleBase
 RWHandleBase (void)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (const RWHandleBase &second)
 
 ~RWHandleBase (void)
 
RWBodyBasebody (void) const
 
RWHandleBaseoperator= (const RWHandleBase &second)
 

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

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.

bool RWThreadManager::getShutdownEnabled ( ) const

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

int RWThreadManager::getTerminationSignal ( ) const
Deprecated:
As of SourcePro 13, thread termination is deprecated.

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.

void RWThreadManager::setShutdownEnabled ( bool  shutdownEnabled)

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

void RWThreadManager::setTerminationSignal ( int  termSignal)
Deprecated:
As of SourcePro 13, thread termination is deprecated.

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()

Copyright © 2016 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.
Provide feedback to Rogue Wave about its documentation.