HH\Lib\Async\KeyedPoll
A keyed variant of Poll
See Poll
if you do not need to preserve keys.
Keys are retrieved with:
foreach ($keyed_poll await as $k => $v) {
===== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING =====
See detailed warning for BasePoll
===== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING =====
Interface Synopsis
namespace HH\Lib\Async;
final class KeyedPoll extends BasePoll<Tk, Tv> implements AsyncKeyedIterator<Tk, Tv> {...}
Public Methods
::from(KeyedTraversable<Tk, Awaitable<Tv>> $awaitables): this
Create aKeyedPoll
from the specified list of awaitables->add(Tk $key, Awaitable<Tv> $awaitable): void
Add a single awaitable to the poll->addMulti(KeyedTraversable<Tk, Awaitable<Tv>> $awaitables): void
Add multiple keys and awaitables to the poll