BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
Implementation of the AsyncWork interface that executes a given function once after the the given delay unless it is cancelled. More...
#include <DelayedAsyncWork.h>
Public Types | |
typedef Poco::SharedPtr < DelayedAsyncWork< Result > > | Ptr |
typedef std::function< void(DelayedAsyncWork < Result > &)> | Call |
Public Types inherited from BeeeOn::AbstractAsyncWork< Result > | |
typedef Poco::SharedPtr < AbstractAsyncWork< Result > > | Ptr |
Public Types inherited from BeeeOn::AsyncWork< Result > | |
typedef Poco::SharedPtr < AsyncWork > | Ptr |
Public Types inherited from BeeeOn::AnyAsyncWork | |
typedef Poco::SharedPtr < AnyAsyncWork > | Ptr |
Public Types inherited from BeeeOn::Cancellable | |
typedef Poco::SharedPtr < Cancellable > | Ptr |
Public Member Functions | |
DelayedAsyncWork (Call f, const Poco::Timespan &delay) | |
DelayedAsyncWork (Call f, Call cancelled, const Poco::Timespan &delay) | |
bool | tryJoin (const Poco::Timespan &timeout) override |
void | cancel () override |
Cancel the operation this object represents. It should exit immediatelly or at least as soon as possible. | |
Public Member Functions inherited from BeeeOn::AbstractAsyncWork< Result > | |
void | setResult (const Result &result) |
Set result of the operation. The result can be set only once. | |
Poco::Nullable< Result > | result () const override |
template<> | |
void | setResult (const Poco::Void &) |
template<> | |
Poco::Nullable< Poco::Void > | result () const |
If the asynchronous operation provides a result, this method gives access to it. Until the operation finishes, the result would be null. AsyncWork implementations with no result returns always null. More... | |
Protected Member Functions | |
void | run () |
Implementation of the AsyncWork interface that executes a given function once after the the given delay unless it is cancelled.
|
overridevirtual |
Implements BeeeOn::AnyAsyncWork.