Method
WaitGroup::add
Adds $delta to the counter of unfinished work.
Description#
public WaitGroup::add(
int $delta = 1
): voidA negative delta marks work as done. When the counter reaches zero, the waiting coroutines resume.
Parameters#
- $delta int = 1
- The amount of work to add
Errors / Exceptions#
| Exception | When |
|---|---|
LogicException | If the counter would become negative |
See also#
WaitGroup::doneMarks one piece of work as done.