SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 (const RWThreadManager &second)
 
 RWThreadManager (RWStaticCtor)
 
 ~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
 

Static Public Member Functions

static RWThreadManager instance ()
 

Related Symbols

(Note that these are not member symbols.)

RWThreadManager rwThreadManager ()
 

Additional Inherited Members

- Protected Member Functions inherited from RWHandleBase
 RWHandleBase (const RWHandleBase &second)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (void)
 
 ~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() [1/3]

RWThreadManager::RWThreadManager ( )

Constructs an empty, invalid handle instance.

◆ RWThreadManager() [2/3]

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() [3/3]

RWThreadManager::RWThreadManager ( const RWThreadManager & second)

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

◆ ~RWThreadManager()

RWThreadManager::~RWThreadManager ( )
inline

Public destructor.

Member Function Documentation

◆ enableEarlyShutdown()

void RWThreadManager::enableEarlyShutdown ( )

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

◆ getCancelTimeOut()

unsigned long RWThreadManager::getCancelTimeOut ( ) const

Retrieves the number of milliseconds to wait for a thread to service a cancellation request.

◆ getShutdownEnabled()

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.

◆ getTerminationSignal()

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.

◆ instance()

static RWThreadManager RWThreadManager::instance ( )
static

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

◆ operator=()

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

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

◆ setCancelTimeOut()

void RWThreadManager::setCancelTimeOut ( unsigned long milliseconds)

Sets the number of milliseconds to wait for a thread to service a cancellation request.

◆ setShutdownEnabled()

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.

◆ setTerminationSignal()

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 Symbol Documentation

◆ rwThreadManager()

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 © 2025 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.