phasync
WaitGroup / await

Method

WaitGroup::await

Waits until the counter is zero.

Description#

public WaitGroup::await(
    float $timeout = PHP_FLOAT_MAX
): void

Parameters#

$timeout float = PHP_FLOAT_MAX
Seconds to wait at most

Errors / Exceptions#

ExceptionWhen
TimeoutExceptionIf the counter is not zero in time
LogicExceptionOutside a coroutine, if the counter is not zero

See also#