folly::coro::collectAllRange

collectAllRange overloads

Synopses

Declared in <folly/coro/Collect.h>

Concurrently await a range of awaitables and collect their results.

template<typename InputRange>
requires !std::is_void_v<
            semi_await_result_t<detail::range_reference_t<InputRange>>>
folly::coro::Task<std::vector</* implementation-defined */>>
collectAllRange(InputRange awaitables);
» more...

Concurrently await a range of value-less awaitables.

template<typename InputRange>
requires std::is_void_v<
            semi_await_result_t<detail::range_reference_t<InputRange>>>
folly::coro::Task<void>
collectAllRange(InputRange awaitables);
» more...

Await an rvalue vector of awaitables, collecting their results.

template<typename SemiAwaitable>
decltype(collectAllRange(detail::MoveRange(awaitables)))
collectAllRange(std::vector<SemiAwaitable> awaitables);
» more...

Return Value

  • A Task completing with a vector of the results in input order.
  • A Task that completes when every awaitable has finished.

Parameters

NameDescription
awaitablesThe range of awaitables to await.