Skip to content

Commit

Permalink
combiner can now take QList<QFuture<T>>
Browse files Browse the repository at this point in the history
  • Loading branch information
vpicaver committed Mar 22, 2020
1 parent a7a36be commit fbb2a0b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions asyncfuture.h
Original file line number Diff line number Diff line change
Expand Up @@ -1595,6 +1595,14 @@ class Combinator : public Observable<void> {
return *this;
}

template <typename T>
Combinator& operator<<(QList<QFuture<T>> futures) {
for(auto future : futures) {
combinedFuture->addFuture(future);
}
return *this;
}

template <typename T>
Combinator& operator<<(Deferred<T> deferred) {
combinedFuture->addFuture(deferred.future());
Expand Down

0 comments on commit fbb2a0b

Please sign in to comment.