Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-25.2.0 | composer require openswoole/core:22.1.5
Manage a pool of Linux worker processes with Swoole. It can be used to manage a group of worker processes to process messages in MQ like Redis or sent from client side. Native Linux commands can also be executed by the pool of processes.
When a process in the pool is terminated, the pool starts a replacement process automatically.
OpenSwoole\Process\Pool::__construct
OpenSwoole\Process\Pool->set
OpenSwoole\Process\Pool->on
OpenSwoole\Process\Pool->getProcess
OpenSwoole\Process\Pool->listen
OpenSwoole\Process\Pool->start
OpenSwoole\Process\Pool->shutdown
OpenSwoole\Process\Pool->write
OpenSwoole\Process\Pool->detach
OpenSwoole\Process\Pool->on('start', fn)
OpenSwoole\Process\Pool->on('stop', fn)
OpenSwoole\Process\Pool->on('workerstart', fn)
OpenSwoole\Process\Pool->on('workerstop', fn)
OpenSwoole\Process\Pool->on('message', fn)