php8.5
Home/ Manual/ parallel / functions/ parallel\run

parallel\run

PHP function Edit on GitHub ✎

(1.0.0)

Execution

Description

parallel\run(Closure $task): Future|null

Shall schedule task for execution in parallel.

parallel\run(Closure $task, array $argv): Future|null

Shall schedule task for execution in parallel, passing argv at execution time.

Automatic Scheduling

If a \parallel\Runtime internally created and cached by a previous call to parallel\run() is idle, it will be used to execute the task. If no \parallel\Runtime is idle parallel will create and cache a \parallel\Runtime.

Note

\parallel\Runtime objects created by the programmer are not used for automatic scheduling.

See Also

Source: reference/parallel/functions/parallel.run.xml · from the official PHP manual (php/doc-en)