Download the PHP package travail/parallel-prefork without Composer
On this page you can find all versions of the php package travail/parallel-prefork. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download travail/parallel-prefork
More information about travail/parallel-prefork
Files in travail/parallel-prefork
Package parallel-prefork
Short Description A simple prefork server framework
License PHP-3.0
Informations about the package parallel-prefork
Parallel\Prefork
NAME
Parallel\Prefork - A simple prefork server framework
SYNOPSIS
INSTALLATION
To install this package into your project via composer, add the following snippet to your composer.json
. Then run composer install
.
If you want to install from github, add the following:
DESCRIPTION
Parallel\Prefork
supports graceful shutdown and run-time reconfiguration.
DEPENDENCIES
- posix
- pcntl
METHODS
__construct
Instantiation. Takes an array as an argument. Recognized parameters are as follows.
max_workers
Number of worker processes (default: 3)
trap_signals
Array of signals to be trapped. Manager process will trap the signals listed in the keys of the array, and send the signal specified in the associated value (if any) to all worker processes.
err_respawn_interval
Number of seconds to deter spawning of child processes after a worker exits abnormally (default: 1)
start
The main routine. Returns undef in child processes. Returns a true
within manager process upon receiving a signal specified in the trapSignals
array.
finish
Child processes should call this function for termination. Takes exit code as an optional argument. Only usable from child processes.
signalAllChildren
Sends signal to all worker processes. Only usable from manager process.
waitAllChildren
Blocks until all worker processes exit. Only usable from manager process.
signalReceived
Returns a signal manager process trapped.
THANKS TO
AUTHOR
travail
LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as PHP itself.
All versions of parallel-prefork with dependencies
ext-posix Version *
ext-pcntl Version *