Fawkes API
Fawkes Development Version
|
Public Member Functions | |
ThreadManagerAspectCollector (ThreadManager *parent_manager) | |
Constructor. | |
virtual void | add (ThreadList &tl) |
Add multiple threads. | |
virtual void | add (Thread *t) |
Add single thread. | |
virtual void | remove (ThreadList &tl) |
Remove multiple threads. | |
virtual void | remove (Thread *t) |
Remove single thread. | |
virtual void | force_remove (ThreadList &tl) |
Force removal of multiple threads. | |
virtual void | force_remove (Thread *t) |
Force removal of a single thread. |
fawkes::ThreadManager::ThreadManagerAspectCollector::ThreadManagerAspectCollector | ( | ThreadManager * | parent_manager | ) |
Constructor.
parent_manager | parent thread manager |
Definition at line 60 of file thread_manager.cpp.
void fawkes::ThreadManager::ThreadManagerAspectCollector::add | ( | ThreadList & | tl | ) | [virtual] |
Add multiple threads.
Adds all the threads in the list to the thread list. Implementations may throw an exception if this fails for whatever reason, read implementation documentation for details. The operation shall be atomic, either all threads are added successfully or none is added at all. If adding fails a CannotInitializeThreadException is thrown.
The thread is started if and only if initialization of all threads suceeds. A CannotInitializeThreadException is thrown if initialization failed for any thread.
tl | list of threads to add |
Implements fawkes::ThreadCollector.
Definition at line 67 of file thread_manager.cpp.
void fawkes::ThreadManager::ThreadManagerAspectCollector::add | ( | Thread * | t | ) | [virtual] |
Add single thread.
Adds the single thread to the internal (implementation specific) thread list. The thread is started if and only if initialization suceeds. A CannotInitializeThreadException is thrown if initialization failed.
t | thread to add |
Implements fawkes::ThreadCollector.
Definition at line 82 of file thread_manager.cpp.
void fawkes::ThreadManager::ThreadManagerAspectCollector::force_remove | ( | fawkes::ThreadList & | tl | ) | [virtual] |
Force removal of multiple threads.
Remove all threads in the thread list from this collector. If there is a thread in the supplied thread list that has never been collected no error shall be thrown but this just be silently ignored.
The threads are finalized, cancelled and joined. The result of the finalization is ignored and the thread is cancelled and joined in any case.
tl | list of threads to remove |
Implements fawkes::ThreadCollector.
Definition at line 123 of file thread_manager.cpp.
void fawkes::ThreadManager::ThreadManagerAspectCollector::force_remove | ( | fawkes::Thread * | t | ) | [virtual] |
Force removal of a single thread.
Remove the thread from the internal thread list. If the thread has never been collected no error shall be thrown but just be silently ignored. The threads are finalized, cancelled and joined. The result of the finalization is ignored and the thread is cancelled and joined in any case.
t | Thread to remove. |
Implements fawkes::ThreadCollector.
Definition at line 129 of file thread_manager.cpp.
void fawkes::ThreadManager::ThreadManagerAspectCollector::remove | ( | ThreadList & | tl | ) | [virtual] |
Remove multiple threads.
Remove all threads in the thread list from this collector. If there is a thread in the supplied thread list that has never been collected no error shall be thrown but this just be silently ignored.
The threads are finalized, cancelled and joined. If the finalization fails for whatever reason the threads are NOT cancelled or stopped. In that case a CannotFinalizeThreadException is thrown.
tl | list of threads to remove |
Implements fawkes::ThreadCollector.
Definition at line 95 of file thread_manager.cpp.
void fawkes::ThreadManager::ThreadManagerAspectCollector::remove | ( | Thread * | t | ) | [virtual] |
Remove single thread.
Remove the thread from the internal thread list. If the thread has never been collected no error shall be thrown but just be silently ignored. The thread is finalized, cancelled and joined. If the finalization fails for whatever reason the thread is NOT cancelled or stopped. In that case a CannotFinalizeThreadException is thrown.
t | Thread to remove. |
Implements fawkes::ThreadCollector.
Definition at line 110 of file thread_manager.cpp.