Attempts orderly thread shutdown at process exit. More...
#include <rw/thread/RWThreadManager.h>
Public Member Functions | |
RWThreadManager () | |
RWThreadManager (RWStaticCtor) | |
RWThreadManager (const RWThreadManager &second) | |
~RWThreadManager () | |
void | enableEarlyShutdown () |
unsigned long | getCancelTimeOut () const |
bool | getShutdownEnabled () const |
int | getTerminationSignal () const |
RWThreadManager & | operator= (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) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
RWThreadManager attempts orderly thread shutdown at process exit.
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.
|
inline |
Public destructor.
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 |
Retrieves the signal to use to terminate a thread.
|
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 | ) |
Sets the signal used to terminate threads.
|
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.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |