Download the PHP package reptily/async-run without Composer
On this page you can find all versions of the php package reptily/async-run. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download reptily/async-run
More information about reptily/async-run
Files in reptily/async-run
Package async-run
Short Description Library for asynchronous launch
License GPL-3.0-or-later
Informations about the package async-run
Install
Example use as object
Example file: /example/async_run.php
This library provides several methods for working with asynchronicity.
When an object is initialized in the constructor, parameters are available.
Example use as callbacks
Example file: /example/async.php
You can easily use the library within your code.
To do this, fill in the necessary functions in the run(...function) method
After this, all the functions specified in run() will be executed, if there is success, then() will be called, if there is an error, catch() will be called, the finally() method will be called in any of the above cases.
Methods
init - Object initialization method, used for prelaunch configuration.
getError - Error return method.
done - The method is run after the entire execution, as a rule, it serves to generate a report.
unlock - Method for pre-unblocking.
run - Method to run handlers.
workerAfterSpawn - Method starts before each worker and distributes tasks to them.
getWorkerResults - The method returns the result of the worker's work.
getWorkerDoneCondition - The method serves as a pointer to the completion of processing all jobs.