From 3b8ebe6d4235f5ba12bc9c9854a6dd28cbff06b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Sat, 21 Feb 2015 12:11:42 +0100 Subject: Async: allow appending Jobs to already running or finished Jobs When user gets a Job (from a method call for instance), which is already running or might have even finished already, they can still append a new Job to the chain and re-execute it. The Job will internally chain up to the last finished Job, use it's result and continue from the next Job in the chain. If a Job in the chain is still running, it will wait for it to finish and pass the result to the next Job in the chain. --- async/src/async.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'async/src/async.cpp') diff --git a/async/src/async.cpp b/async/src/async.cpp index c9fedc7..6eefd1b 100644 --- a/async/src/async.cpp +++ b/async/src/async.cpp @@ -27,6 +27,8 @@ using namespace Async; Private::ExecutorBase::ExecutorBase(const ExecutorBasePtr &parent) : mPrev(parent) , mResult(0) + , mIsRunning(false) + , mIsFinished(false) { } -- cgit v1.2.3