3 #include <Poco/SingletonHolder.h>
5 #include "util/AbstractAsyncWork.h"
14 template <
typename Result = Poco::Vo
id>
17 typedef Poco::SharedPtr<BlockingAsyncWork<Result>> Ptr;
24 bool tryJoin(
const Poco::Timespan &)
override;
38 static typename BlockingAsyncWork<Result>::Ptr
instance();
41 template <
typename Result>
47 template <
typename Result>
52 template <
typename Result>
61 static Poco::SingletonHolder<BlockingAsyncWork::Ptr> holder;
63 auto &work = *holder.get();
AbstractAsyncWork provides a generic implementation of method result() and a supplementary method set...
Definition: AbstractAsyncWork.h:17
bool tryJoin(const Poco::Timespan &) override
It immediately returns true because there is nothing to wait for. We are already finished when this m...
Definition: BlockingAsyncWork.h:42
BlockingAsyncWork is an adapter of non-asynchronous operations to the AsyncWork interface. It implements a time barrier that just waits until the underlying operation finishes.
Definition: BlockingAsyncWork.h:15
static BlockingAsyncWork< Result >::Ptr instance()
BlockingAsyncWork does not have to be created everytime it is needed because it does not contain any ...
Definition: BlockingAsyncWork.h:53
void cancel() override
Do nothing because the underlying operation is already finished at the time we can call this method...
Definition: BlockingAsyncWork.h:48