#include <CTPThreadPool.h>
Public Member Functions | |
CTPThreadPool () | |
Constructor. | |
CmdTimeoutThread * | createCmdTimeoutThread () |
Creates a new timeout thread. | |
HeartbeatThread * | createHeartbeatThread () |
Creates a new heartbeat thread. | |
ReceiverThread * | createReceiverThread () |
Creates a new receiver thread. | |
void | cleanup () |
Cleanup any thread object that has terminated its execution. | |
Private Attributes | |
ArrayList | threadList |
The purpose is not reusing existing threads, but rather to ensure that thread objects are properly release when no longer running. This class is a very simple form of garbage collection for CTP threads. The cleanup is not performed automatically but must be explicitelly invoked. Since CTP has periodic activity this is not a problem in this context.