#include <ThreadPool.hpp>
Definition at line 29 of file ThreadPool.hpp.
kaa::ThreadPool::~ThreadPool |
( |
| ) |
|
Add a task for execution.
- Parameters
-
- Exceptions
-
std::invalid_argument | The task object is invalid, i.e. empty. |
std::logic_error | The thread pool is shut down. |
Implements kaa::IThreadPool.
virtual void kaa::ThreadPool::awaitTermination |
( |
std::size_t |
seconds | ) |
|
|
virtual |
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs.
- Note
- Call only after shutdown().
- Parameters
-
seconds | The maximum time in seconds to wait. |
- Exceptions
-
std::logic_error | The method was called without shutdown(). |
Implements kaa::IThreadPool.
virtual void kaa::ThreadPool::shutdown |
( |
| ) |
|
|
virtual |
Initiates a shutdown in which previously added tasks are executed, but no new tasks will be accepted.
Implements kaa::IThreadPool.
virtual void kaa::ThreadPool::shutdownNow |
( |
| ) |
|
|
virtual |
Initiates a shutdown in which all executing tasks will complete. Pending tasks will be declined.
Implements kaa::IThreadPool.
const std::size_t kaa::ThreadPool::DEFAULT_WORKER_NUMBER = 1 |
|
static |
The documentation for this class was generated from the following file:
- /home/architec/Documents/kaa/client/client-multi/client-cpp/kaa/utils/ThreadPool.hpp