cpp-mate
0.7
Helpful library for C++.
|
Represents pipeline implemetation with ThreadPool backend. More...
#include <ThreadPool.hpp>
Public Member Functions | |
PipelineThreadPool (const PipelineThreadPool &other)=default | |
PipelineThreadPool (PipelineThreadPool &&other)=default | |
PipelineThreadPool & | operator= (const PipelineThreadPool &other)=default |
PipelineThreadPool & | operator= (PipelineThreadPool &&other)=default |
std::future< R > | addTask (typename Pipeline< R, A... >::Signature task, A &&... args) override |
PipelineThreadPool (unsigned maxThreads=0) | |
Constructor. More... | |
PipelineThreadPool (std::shared_ptr< ThreadPool< R >> pool) | |
Constructor. More... | |
std::shared_ptr< ThreadPool< R > > | getPool () const |
getPool More... | |
![]() | |
virtual | ~Pipeline ()=default |
virtual std::future< R > | addTask (Signature task, A &&... args)=0 |
Adds a new task for execution. More... | |
Static Public Member Functions | |
static std::unique_ptr< Pipeline< R, A... > > | create (unsigned maxThreads=0) |
Creates pipeline instance. More... | |
static std::unique_ptr< Pipeline< R, A... > > | create (std::shared_ptr< ThreadPool< R >> pool) |
Creates pipeline instance. More... | |
Additional Inherited Members | |
![]() | |
using | Signature = std::function< R(A...)> |
Represents pipeline implemetation with ThreadPool backend.
|
default |
|
default |
|
inlineexplicit |
Constructor.
maxThreads | the desired value of maximum possible threads in the pool. Zero value means choosing an optimal value for the current platform. |
|
inlineexplicit |
Constructor.
pool | the exisiting thread pool backend. |
|
inlineoverride |
|
inlinestatic |
Creates pipeline instance.
pool | the exisiting thread pool backend. |
|
inlinestatic |
Creates pipeline instance.
maxThreads | the desired value of maximum possible threads in the pool. Zero value means choosing an optimal value for the current platform. |
|
inline |
getPool
|
default |
|
default |