Amp\Parallel\Worker\Worker interfaceWorker

An interface for a parallel worker thread that runs a queue of tasks.

Summary

Properties

Methods

Methods

isRunning —public functionisRunning():bool

Checks if the worker is running.

isIdle —public functionisIdle():bool

Checks if the worker is currently idle.

enqueue —public functionenqueue(Amp\Parallel\Worker\Task$task):Amp\Promise
No documentation.
Type Parameter Description Default Value
Amp\Parallel\Worker\Task $task No documentation. none
shutdown —public functionshutdown():Amp\Promise
No documentation.
kill —public functionkill()

Immediately kills the context.