5 #include <Poco/Thread.h>
7 #include "util/AbstractAsyncWork.h"
16 template <
typename Result = Poco::Vo
id>
19 typedef Poco::SharedPtr<ThreadWrapperAsyncWork<Result>> Ptr;
23 bool tryJoin(
const Poco::Timespan &timeout)
override;
26 Poco::Thread &thread();
29 Poco::Thread &m_thread;
32 template <
typename Result>
34 Poco::Thread &thread):
39 template <
typename Result>
42 return m_thread.tryJoin(timeout.totalMilliseconds());
45 template <
typename Result>
51 template <
typename Result>
bool tryJoin(const Poco::Timespan &timeout) override
Definition: ThreadWrapperAsyncWork.h:40
AbstractAsyncWork provides a generic implementation of method result() and a supplementary method set...
Definition: AbstractAsyncWork.h:17
Adapter of Poco::Thread to AsyncWork interface. The Thread has no general way how to be stopped and t...
Definition: ThreadWrapperAsyncWork.h:17
void cancel() override
Cancel the operation this object represents. It should exit immediatelly or at least as soon as possi...
Definition: ThreadWrapperAsyncWork.h:46