BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
AsyncWork.h
1 #pragma once
2 
3 #include <Poco/Nullable.h>
4 #include <Poco/Void.h>
5 
6 #include "util/AnyAsyncWork.h"
7 
8 namespace BeeeOn {
9 
20 template <typename Result = Poco::Void>
21 class AsyncWork : public AnyAsyncWork {
22 public:
23  typedef Poco::SharedPtr<AsyncWork> Ptr;
24 
33  virtual Poco::Nullable<Result> result() const;
34 };
35 
36 template <typename Result>
37 Poco::Nullable<Result> AsyncWork<Result>::result() const
38 {
39  static const Poco::Nullable<Result> null;
40  return null;
41 }
42 
43 }
AnyAsyncWork represents an asynchronous work to be processed. Such work is defined only in terms of e...
Definition: AnyAsyncWork.h:15
virtual Poco::Nullable< Result > result() const
If the asynchronous operation provides a result, this method gives access to it. Until the operation ...
Definition: AsyncWork.h:37
AsyncWork is an interface allowing to wait until an asynchronous operation finishes. It is also possible to force-stop it by calling cancel().
Definition: AsyncWork.h:21