Template Class MultiFuture

Inheritance Relationships

Base Type

  • public std::vector< std::future< T > >

Class Documentation

template<typename T>
class MultiFuture : public std::vector<std::future<T>>

Aggregates a list of futures into one future that can be waited on all at once.

Public Functions

MultiFuture(const MultiFuture&) = delete

Copy-construction is banned.

MultiFuture &operator=(const MultiFuture&) = delete

Copy-assignment is banned.

inline void WaitAll()

Wait on all futures.

Note

Blocks until all futures are completed

inline int NumReadyFutures()

Get the number of futures that are ready.

Returns:

The number of ready futures