diff options
Diffstat (limited to 'async/src')
-rw-r--r-- | async/src/async.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/async/src/async.h b/async/src/async.h index 2430a27..2243046 100644 --- a/async/src/async.h +++ b/async/src/async.h | |||
@@ -585,7 +585,7 @@ ExecutionPtr Executor<PrevOut, Out, In ...>::exec(const ExecutorBasePtr &self) | |||
585 | // chainup | 585 | // chainup |
586 | execution->prevExecution = mPrev ? mPrev->exec(mPrev) : ExecutionPtr(); | 586 | execution->prevExecution = mPrev ? mPrev->exec(mPrev) : ExecutionPtr(); |
587 | 587 | ||
588 | execution->resultBase = this->createFuture<Out>(execution); | 588 | execution->resultBase = ExecutorBase::createFuture<Out>(execution); |
589 | auto fw = new Async::FutureWatcher<Out>(); | 589 | auto fw = new Async::FutureWatcher<Out>(); |
590 | QObject::connect(fw, &Async::FutureWatcher<Out>::futureReady, | 590 | QObject::connect(fw, &Async::FutureWatcher<Out>::futureReady, |
591 | [fw, execution, this]() { | 591 | [fw, execution, this]() { |
@@ -678,7 +678,7 @@ void ThenExecutor<Out, In ...>::run(const ExecutionPtr &execution) | |||
678 | assert(prevFuture->isFinished()); | 678 | assert(prevFuture->isFinished()); |
679 | } | 679 | } |
680 | 680 | ||
681 | this->mFunc(prevFuture ? prevFuture->value() : In() ..., *execution->result<Out>()); | 681 | ThenExecutor<Out, In ...>::mFunc(prevFuture ? prevFuture->value() : In() ..., *execution->result<Out>()); |
682 | } | 682 | } |
683 | 683 | ||
684 | template<typename PrevOut, typename Out, typename In> | 684 | template<typename PrevOut, typename Out, typename In> |
@@ -703,7 +703,7 @@ void EachExecutor<PrevOut, Out, In>::run(const ExecutionPtr &execution) | |||
703 | 703 | ||
704 | for (auto arg : prevFuture->value()) { | 704 | for (auto arg : prevFuture->value()) { |
705 | Async::Future<Out> future; | 705 | Async::Future<Out> future; |
706 | this->mFunc(arg, future); | 706 | EachExecutor<PrevOut, Out, In>::mFunc(arg, future); |
707 | auto fw = new Async::FutureWatcher<Out>(); | 707 | auto fw = new Async::FutureWatcher<Out>(); |
708 | mFutureWatchers.append(fw); | 708 | mFutureWatchers.append(fw); |
709 | QObject::connect(fw, &Async::FutureWatcher<Out>::futureReady, | 709 | QObject::connect(fw, &Async::FutureWatcher<Out>::futureReady, |
@@ -756,7 +756,7 @@ void SyncThenExecutor<Out, In ...>::run(const ExecutionPtr &execution, std::fals | |||
756 | : nullptr; | 756 | : nullptr; |
757 | (void) prevFuture; // silence 'set but not used' warning | 757 | (void) prevFuture; // silence 'set but not used' warning |
758 | Async::Future<Out> *future = execution->result<Out>(); | 758 | Async::Future<Out> *future = execution->result<Out>(); |
759 | future->setValue(this->mFunc(prevFuture ? prevFuture->value() : In() ...)); | 759 | future->setValue(SyncThenExecutor<Out, In...>::mFunc(prevFuture ? prevFuture->value() : In() ...)); |
760 | } | 760 | } |
761 | 761 | ||
762 | template<typename Out, typename ... In> | 762 | template<typename Out, typename ... In> |
@@ -767,7 +767,7 @@ void SyncThenExecutor<Out, In ...>::run(const ExecutionPtr &execution, std::true | |||
767 | ? execution->prevExecution->result<typename detail::prevOut<In ...>::type>() | 767 | ? execution->prevExecution->result<typename detail::prevOut<In ...>::type>() |
768 | : nullptr; | 768 | : nullptr; |
769 | (void) prevFuture; // silence 'set but not used' warning | 769 | (void) prevFuture; // silence 'set but not used' warning |
770 | this->mFunc(prevFuture ? prevFuture->value() : In() ...); | 770 | SyncThenExecutor<Out, In ...>::mFunc(prevFuture ? prevFuture->value() : In() ...); |
771 | } | 771 | } |
772 | 772 | ||
773 | template<typename PrevOut, typename Out, typename In> | 773 | template<typename PrevOut, typename Out, typename In> |
@@ -799,13 +799,13 @@ void SyncEachExecutor<PrevOut, Out, In>::run(const ExecutionPtr &execution) | |||
799 | template<typename PrevOut, typename Out, typename In> | 799 | template<typename PrevOut, typename Out, typename In> |
800 | void SyncEachExecutor<PrevOut, Out, In>::run(Async::Future<Out> *out, const typename PrevOut::value_type &arg, std::false_type) | 800 | void SyncEachExecutor<PrevOut, Out, In>::run(Async::Future<Out> *out, const typename PrevOut::value_type &arg, std::false_type) |
801 | { | 801 | { |
802 | out->setValue(out->value() + this->mFunc(arg)); | 802 | out->setValue(out->value() + SyncEachExecutor<PrevOut, Out, In>::mFunc(arg)); |
803 | } | 803 | } |
804 | 804 | ||
805 | template<typename PrevOut, typename Out, typename In> | 805 | template<typename PrevOut, typename Out, typename In> |
806 | void SyncEachExecutor<PrevOut, Out, In>::run(Async::Future<Out> * /* unused */, const typename PrevOut::value_type &arg, std::true_type) | 806 | void SyncEachExecutor<PrevOut, Out, In>::run(Async::Future<Out> * /* unused */, const typename PrevOut::value_type &arg, std::true_type) |
807 | { | 807 | { |
808 | this->mFunc(arg); | 808 | SyncEachExecutor<PrevOut, Out, In>::mFunc(arg); |
809 | } | 809 | } |
810 | 810 | ||
811 | template<typename Out, typename In> | 811 | template<typename Out, typename In> |