Module: Threads Package: Threading
RWThreadManager RWHandleBase
enableEarlyShutdown() getCancelTimeOut() getShutdownEnabled() |
getTerminationSignal() instance() operator=() |
RWThreadManager() setCancelTimeOut() setShutdownEnabled() |
setTerminationSignal() |
#include <rw/thread/RWThreadManager.h>
RWThreadManager attempts orderly thread shutdown at process exit. It is based on the handle/body design and is a counted pointer handle for a RWThreadManagerImp instance.
static RWThreadManager instance(void);
Creates and/or gets the current singleton thread manager instance.
RWThreadManager(void);
Constructs an empty, invalid handle instance.
RWThreadManager(RWStaticCtor);
This constructor allows you to create a global static RWThreadManager handle object that may be assigned to before it is constructed. This constructor does not change the static instance.
RWThreadManager(const RWThreadManager& second);
Binds a new handle to the runnable instance, if any, pointed to by the handle second.
~RWThreadManager(void);
Public destructor.
RWThreadManager& operator=(const RWThreadManager& second);
Assignment operator. Binds the handle to the same threaded runnable, if any, pointed-to by second.
void enableEarlyShutdown(void);
Allows the thread manager to clean up threads at program exit, but before destruction of objects with static storage duration.
unsigned long getCancelTimeOut(void) const;
Retrieves the number of milliseconds to wait for a thread to service a cancellation request before attempting to forcibly terminate it.
int getTerminationSignal(void);
Retrieves the signal to use to terminate a thread. This function is available only when using Solaris threads.
bool 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.
void 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 setTerminationSignal(int termSignal);
Sets the signal used to terminate threads. This function is available only when using Solaris threads.
void setShutdownEnabled(bool shutdownEnabled);
Sets the value of the shutdown enabled flag. If the flag is set then the thread manager will attempt to force all threads to exit before the program terminates.
© 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.