Amp\Parallel\Worker\Task interface Task

A runnable unit of execution.

Summary

Properties

Methods

Methods

run — public function run(Amp\Parallel\Worker\Environment $environment): mixed|Amp\Promise|Generator

Runs the task inside the caller's context.

Does not have to be a coroutine, can also be a regular function returning a value.

Type Parameter Description Default Value
Amp\Parallel\Worker\Environment $environment No documentation. none