resolve($value); $wait2->resolve($value); }); yield $wait1; yield $wait2; return $counter; } }