Download the PHP package ejunker/worker-pool without Composer
On this page you can find all versions of the php package ejunker/worker-pool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ejunker/worker-pool
More information about ejunker/worker-pool
Files in ejunker/worker-pool
Package worker-pool
Short Description Runs tasks in a parallel processing workerpool.
License GPL-3.0+
Homepage https://github.com/qxsch/WorkerPool
Informations about the package worker-pool
WorkerPool
Parallel Processing WorkerPool for PHP
10K Downloads within 4 Months, thank you very much! We're adding features as anyone requires them.
Examples
The WorkerPool class provides a very simple interface to pass data to a worker pool and have it processed. You can at any time fetch the results from the workers. Each worker child can receive and return any value that can be serialized.
A simple example
A more sophisticated example
Synchronize your workers
In case you need to access shared ressources, you can synchronize your workers.
Disable semaphore (ability to synchronize workers)
You can disable the semaphore. Some people complained about opening semaphores, that they do not need at all.
Automatic respawn
You can choose to automatically respawn dead workers.
Each time a worker dies, a new one will be created with an incremented index.
You should avoid the situation where a worker dies but the respawn capability can be a useful workaround until you fix the situation.
Transparent output to ps
See what's happening when running a PS:
Documentation
The documentation can be found here http://qxsch.github.io/WorkerPool/doc/
All versions of worker-pool with dependencies
ext-pcntl Version *
ext-posix Version *
ext-sysvsem Version *
ext-sockets Version *