Scheduler
class Scheduler (View source)
Methods
false|void
add(callable $func, ...$params)
Add a task (implemented in a callback).
false|void
parallel(int $n, callable $func, ...$params)
Add a list of tasks (implemented in callbacks).
void
set(array $settings)
To set runtime configurations of coroutines.
array|null
getOptions()
To get runtime configurations of coroutines.
bool
start()
Start running the list of tasks (callbacks) added through method add() and parallel().
Details
false|void
add(callable $func, ...$params)
Add a task (implemented in a callback).
false|void
parallel(int $n, callable $func, ...$params)
Add a list of tasks (implemented in callbacks).
void
set(array $settings)
To set runtime configurations of coroutines.
This method is an alias of method \Swoole\Coroutine::set().
array|null
getOptions()
Since: Swoole 4.6.0
To get runtime configurations of coroutines.
This method is an alias of method \Swoole\Coroutine::getOptions().
bool
start()
Start running the list of tasks (callbacks) added through method add() and parallel().