![]() |
BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
Implementation of AsyncExecutor interface that invokes given procedures in parallel. More...
#include <ParallelExecutor.h>
Public Types | |
|
typedef Poco::SharedPtr < ParallelExecutor > | Ptr |
Public Types inherited from BeeeOn::AsyncExecutor | |
|
typedef Poco::SharedPtr < AsyncExecutor > | Ptr |
Public Types inherited from BeeeOn::StoppableRunnable | |
|
typedef Poco::SharedPtr < StoppableRunnable > | Ptr |
Public Member Functions | |
| void | setBaseName (const std::string &baseName) |
| void | setContentedDelay (const Poco::Timespan &delay) |
| void | run () override |
| void | stop () override |
| size_t | flushDeferred () |
| void | invoke (std::function< void()> f) override |
Public Member Functions inherited from BeeeOn::HavingThreadPool | |
| void | setMinThreads (int min) |
| void | setMaxThreads (int max) |
| void | setThreadIdleTime (const Poco::Timespan &time) |
| Poco::ThreadPool & | pool () |
Additional Inherited Members | |
Protected Member Functions inherited from BeeeOn::HavingThreadPool | |
| void | initPool () |
Protected Member Functions inherited from BeeeOn::Loggable | |
| void | setupLogger (Poco::Logger *logger=0) const |
| Poco::Logger & | logger () const |
| Loggable (const ClassInfo &info) | |
| Loggable (const std::type_info &info) | |
Static Protected Member Functions inherited from BeeeOn::Loggable | |
| static Poco::Logger & | forMethod (const char *name) |
| static Poco::Logger & | forClass (const ClassInfo &info) |
| static Poco::Logger & | forClass (const std::type_info &info) |
| template<typename T > | |
| static Poco::Logger & | forInstance (const T *i) |
| static void | configureSimple (Poco::Logger &logger, const std::string &level) |
| static void | logException (Poco::Logger &logger, const Poco::Message::Priority priority, const Poco::Exception &e, const char *file, size_t line) |
Implementation of AsyncExecutor interface that invokes given procedures in parallel.
ParallelExecutor maintains a thread-pool which is used to allow parallel execution of the procedure invocations requests. If the executor is contented, the requests are enqueued to not loose any of them.
| size_t ParallelExecutor::flushDeferred | ( | ) |
Get rid of all defered lambda-wrappers. It is called automatically by destructor.
|
overridevirtual |
Add task to queue for executing
Implements BeeeOn::AsyncExecutor.
|
override |
Executes a loop that invokes deferred procedures.
|
overridevirtual |
Stops the loop and waits until all threads are stopped.
Implements BeeeOn::StoppableRunnable.
1.8.5