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);

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);

Await an rvalue vector of awaitables, collecting their results.

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

Return Value

  • A Task completing with a vector of the results in input order.

  • A Task that completes when every awaitable has finished.

Parameters

Name

Description

awaitables

The range of awaitables to await.

Created with MrDocs