The pool of threads.
More...
#include <B2BITS_ThreadsPool.h>
Utils::ThreadsPool::ThreadsPool |
( |
| ) |
|
Utils::ThreadsPool::~ThreadsPool |
( |
| ) |
|
void Utils::ThreadsPool::goThroughThreads |
( |
| ) |
|
Goes through all active threads.
- See Also
- ThreadsPoolListener::onGoThroughThreads(threadAttrs)
void Utils::ThreadsPool::interruptAll |
( |
| ) |
|
Interrupts all active threads.
void Utils::ThreadsPool::joinAll |
( |
| ) |
|
Joins all active threads.
Adds a new thread to the pool to execute runnable task.
- Parameters
-
runnable | The task to run. Must exist until the thread is finished e.g. until joinAll() returns. |
threadAttrs | The thread attributes to apply to the new thread. |
void Utils::ThreadsPool::notifyNewThreadAssigned |
( |
ThreadAttrs & |
threadAttrs | ) |
|
Calls ThreadsPoolListener::onNewThreadCreated(threadAttrs) for all listeners.
- Parameters
-
[in,out] | threadAttrs | thread attributes to pass to listeners |
- See Also
- ThreadsPoolListener::onNewThreadCreated(threadAttrs)
void Utils::ThreadsPool::registerListener |
( |
Listener * |
listener | ) |
|
Registers a new thread pool listener.
void Utils::ThreadsPool::unregisterListener |
( |
Listener * |
listener | ) |
|
Registers the thread pool listener.
Must not be called from the Listener callback.