HH\Lib\Keyset\from_async

Meta Engineer?

This is available as Keyset\from_async in the www repository.

Returns a new keyset containing the awaited result of the given Awaitables

namespace HH\Lib\Keyset;

function from_async<Tv as arraykey>(
  Traversable<Awaitable<Tv>> $awaitables,
): Awaitable<keyset<Tv>>;

Time complexity: O(n * a), where a is the complexity of the synchronous portions of each Awaitable Space complexity: O(n)

The IO operations for each Awaitable will happen in parallel.

Parameters

Returns