phasync
PollerInterface / poll

Method

PollerInterface::poll

Waits up to $timeout seconds until a waited-for stream is ready, and unparks the waiters of those that are.

Description#

public PollerInterface::poll(
    float $timeout
): void

0 does not wait. With nothing waited for, it sleeps $timeout. A stream is ready when it is readable or writable as waited for, at its end, or failed.

Parameters#

$timeout float