Await a range of awaitables with bounded concurrency, collecting results.

Synopsis

Declared in <folly/coro/Collect.h>

template<typename InputRange>
requires !std::is_void_v<
            semi_await_result_t<detail::range_reference_t<InputRange>>>
folly::coro::Task<std::vector</* implementation-defined */>>
collectAllWindowed(
    InputRange awaitables,
    std::size_t maxConcurrency);

Return Value

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

Parameters

Name

Description

awaitables

The range of awaitables to await.

maxConcurrency

The maximum number of awaitables awaited at once.

Created with MrDocs