Coroutine

Slightly different from the asynchronous ideas on this feature is based on the Generator as a whole.

Let's take a look at its interface.

/**
 * @param Generator|callable ...$coroutines
 * @return void
 */
public static function runBlocking(Generator|callable ...$coroutines): void;

public static function launch(callable $callback): Generator;

Last updated