diff options
author | Dan Vrátil <dvratil@redhat.com> | 2015-02-21 12:11:42 +0100 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2015-02-21 12:11:44 +0100 |
commit | 3b8ebe6d4235f5ba12bc9c9854a6dd28cbff06b5 (patch) | |
tree | 4e2a987e6c62523994965789387cace578e4c8d8 /async/src/async.cpp | |
parent | 76ec0cfe075e3af758657f9aecab7d7ce7e8d387 (diff) | |
download | sink-3b8ebe6d4235f5ba12bc9c9854a6dd28cbff06b5.tar.gz sink-3b8ebe6d4235f5ba12bc9c9854a6dd28cbff06b5.zip |
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.
Diffstat (limited to 'async/src/async.cpp')
-rw-r--r-- | async/src/async.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; | |||
27 | Private::ExecutorBase::ExecutorBase(const ExecutorBasePtr &parent) | 27 | Private::ExecutorBase::ExecutorBase(const ExecutorBasePtr &parent) |
28 | : mPrev(parent) | 28 | : mPrev(parent) |
29 | , mResult(0) | 29 | , mResult(0) |
30 | , mIsRunning(false) | ||
31 | , mIsFinished(false) | ||
30 | { | 32 | { |
31 | } | 33 | } |
32 | 34 | ||