class Pool mixin Factory mixin PendingProcess (View source)

Properties

protected Factory $factory

The process factory instance.

protected callable $callback

The callback that resolves the pending processes.

protected array $pendingProcesses

The array of pending processes.

Methods

void
__construct(Factory $factory, callable $callback)

Create a new process pool.

as(string $key)

Add a process to the pool with a key.

start(callable|null $output = null)

Start all of the processes in the pool.

run()

Start and wait for the processes to finish.

wait()

Start and wait for the processes to finish.

__call(string $method, array $parameters)

Dynamically proxy methods calls to a new pending process.

Details

void __construct(Factory $factory, callable $callback)

Create a new process pool.

Parameters

Factory $factory
callable $callback

Return Value

void

PendingProcess as(string $key)

Add a process to the pool with a key.

Parameters

string $key

Return Value

PendingProcess

InvokedProcessPool start(callable|null $output = null)

Start all of the processes in the pool.

Parameters

callable|null $output

Return Value

InvokedProcessPool

ProcessPoolResults run()

Start and wait for the processes to finish.

Return Value

ProcessPoolResults

ProcessPoolResults wait()

Start and wait for the processes to finish.

Return Value

ProcessPoolResults

PendingProcess __call(string $method, array $parameters)

Dynamically proxy methods calls to a new pending process.

Parameters

string $method
array $parameters

Return Value

PendingProcess