#include <acsThreadBase.h>
Inheritance diagram for ACS::ThreadManagerBase:
Public Member Functions | |
ThreadManagerBase () | |
~ThreadManagerBase () | |
int | getThreadCount () const |
ACE_CString | getThreadName (const int pos) const |
ThreadBase * | getThreadAt (const int pos) const |
ThreadBase * | getThreadByName (const ACE_CString &name) |
ThreadBase * | getThreadByID (ACE_thread_t id) |
ThreadBase * | create (const ACE_CString &name, void *threadProc, void *parameter, const TimeInterval &responseTime=ThreadBase::defaultResponseTime, const TimeInterval &sleepTime=ThreadBase::defaultSleepTime, const long _thrFlags=THR_NEW_LWP|THR_DETACHED) |
bool | add (const ACE_CString &name, ThreadBase *acsBaseThread) |
bool | stop (const ACE_CString &name) |
bool | stopAll () |
void | exit (const ACE_CString &name) |
void | exitAll () |
bool | cancel (const ACE_CString &name) |
bool | cancelAll () |
bool | terminate (const ACE_CString &name) |
bool | terminateAll () |
bool | restart (const ACE_CString &name) |
bool | restartAll () |
bool | restartDead () |
bool | suspend (const ACE_CString &name) |
bool | suspendAll () |
bool | resume (const ACE_CString &name) |
bool | resumeAll () |
bool | isAlive (const ACE_CString &name) |
bool | areAllAlive () |
int | join (const ACE_thread_t &tid) |
ACE_Thread_Manager * | getACEThreadManager () |
Protected Member Functions | |
void | add2map (const ACE_CString &name, ThreadBase *thread) |
void | removeFromMap (const ACE_CString &name) |
Protected Attributes | |
ACE_Recursive_Thread_Mutex | m_addRemoveMutex |
mutex used by add and remove method | |
Private Member Functions | |
void | operator= (const ThreadManagerBase &) |
ThreadManagerBase (const ThreadManagerBase &) | |
Private Attributes | |
ACE_Thread_Manager * | threadManager_mp |
pointer to ACE_Threads_Manager | |
ThreadMap | threadMap_m |
Thread name-thread map data store. | |
std::vector< ThreadBase * > | threads_m |
Vector of all threads. |
|
Constructor. |
|
Destructor. Also terminates and deletes all threads. |
|
ALMA C++ coding standards state copy constructors should be disabled. |
|
Add a thread to the ThreadBaseManger thread pool. WARNING: after this operation ThreadManagerBase owns the pointer of ThreadBase. ThreadBase object is deleted on destruction of ThreadManagerBase object. Therefore the given ThreadBase must have been allocated on the heap
|
|
Add a thread to the ThreadManagerBase data store.
|
|
Checks if all threads are alive (not terminated).
|
|
Cancel (forceful termination) named thread. Avoid using this kind of thread termination.
|
|
Cancel (forceful termination) all threads.
|
|
Create a new thread and add it to the pool. The thread is immediately created (create=true) and suspended
|
|
Notify named thread to exit thread worker function.
|
|
Notify all the threads to exit thread worker function.
|
|
Returns pointer to the ACE Thread Manager
|
|
Get thread at the specified position.
|
|
Get thread with specified ID.
|
|
Get thread with specified named.
|
|
Get number of threads in the pool.
|
|
Get name of the thread at the specified position.
|
|
Checks if named thread is alive (not terminated).
|
|
join joinable thread
|
|
ALMA C++ coding standards state assignment operators should be disabled. |
|
|
|
Restart named thread. Restarting means treminate and recreate a new thread.
|
|
Restart all threads.
|
|
Restart all dead threads, i.e. all terminated threads |
|
Continue the execution of a previously suspended thread.
|
|
Continue the execution of all suspended threads.
|
|
Stop named thread.
|
|
Stop all the threads_m.
|
|
Suspend the execution of a particular thread.
|
|
Suspend the execution of all running threads.
|
|
Terminate named thread.
|
|
Terminate all threads.
|
|
mutex used by add and remove method
|
|
pointer to ACE_Threads_Manager
|
|
Thread name-thread map data store.
|
|
Vector of all threads.
|