Amp\Parallel\Worker\Internal\PooledWorker classPooledWorker implementsAmp\Parallel\Worker\Worker

Summary

Properties

Methods

Properties

Methods

__construct —public function__construct(Amp\Parallel\Worker\Worker$worker,callable$push)
No documentation.
Type Parameter Description Default Value
Amp\Parallel\Worker\Worker $worker No documentation. none
callable $push Callable to push the worker back into the queue. none
__destruct —public function__destruct()

Automatically pushes the worker back into the queue.

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.