client-cpp  0.10.0
kaa::IThreadPool Class Referenceabstract

#include <IThreadPool.hpp>

+ Inheritance diagram for kaa::IThreadPool:

Public Member Functions

virtual void add (const ThreadPoolTask &task)=0
 Add a task for execution. More...
 
virtual void awaitTermination (std::size_t seconds)=0
 Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs. More...
 
virtual void shutdown ()=0
 Initiates a shutdown in which previously added tasks are executed, but no new tasks will be accepted. More...
 
virtual void shutdownNow ()=0
 Initiates a shutdown in which all executing tasks will complete. Pending tasks will be declined. More...
 
virtual ~IThreadPool ()
 

Detailed Description

Definition at line 28 of file IThreadPool.hpp.

Constructor & Destructor Documentation

virtual kaa::IThreadPool::~IThreadPool ( )
inlinevirtual

Definition at line 65 of file IThreadPool.hpp.

Member Function Documentation

virtual void kaa::IThreadPool::add ( const ThreadPoolTask task)
pure virtual

Add a task for execution.

Parameters
taskThe task to add.
Exceptions
std::invalid_argumentThe task object is invalid, i.e. empty.
std::logic_errorThe thread pool is shut down.

Implemented in kaa::ThreadPool.

virtual void kaa::IThreadPool::awaitTermination ( std::size_t  seconds)
pure virtual

Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs.

Note
Call only after shutdown().
Parameters
secondsThe maximum time in seconds to wait.
Exceptions
std::logic_errorThe method was called without shutdown().

Implemented in kaa::ThreadPool.

virtual void kaa::IThreadPool::shutdown ( )
pure virtual

Initiates a shutdown in which previously added tasks are executed, but no new tasks will be accepted.

Implemented in kaa::ThreadPool.

virtual void kaa::IThreadPool::shutdownNow ( )
pure virtual

Initiates a shutdown in which all executing tasks will complete. Pending tasks will be declined.

Implemented in kaa::ThreadPool.


The documentation for this class was generated from the following file: