HH\Lib\Keyset\from_async

Requires the Hack Standard Library to be installed.
Facebook Engineer?

This function is available as Keyset\gen() in Facebook's 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 each Awaitable Space complexity: O(n)

Parameters

Returns