PHP Class Jenner\SimpleFork\AbstractPool

Afficher le fichier Open project: huyanping/simple-fork-php

Protected Properties

Свойство Type Description
$processes Process[] process list

Méthodes publiques

Méthode Description
aliveCount ( ) : integer get the count of running processes
getProcessByPid ( $pid ) : null | Process get process by pid
isFinished ( ) : boolean if all processes are stopped
shutdown ( integer $signal = SIGTERM ) shutdown all process
shutdownForce ( ) shutdown sub process and no wait. it is dangerous, maybe the sub process is working.
wait ( boolean | true $block = true, integer $sleep = 100 ) waiting for the sub processes to exit

Method Details

aliveCount() public méthode

get the count of running processes
public aliveCount ( ) : integer
Résultat integer

getProcessByPid() public méthode

get process by pid
public getProcessByPid ( $pid ) : null | Process
$pid
Résultat null | Process

isFinished() public méthode

if all processes are stopped
public isFinished ( ) : boolean
Résultat boolean

shutdown() public méthode

shutdown all process
public shutdown ( integer $signal = SIGTERM )
$signal integer

shutdownForce() public méthode

shutdown sub process and no wait. it is dangerous, maybe the sub process is working.
public shutdownForce ( )

wait() public méthode

waiting for the sub processes to exit
public wait ( boolean | true $block = true, integer $sleep = 100 )
$block boolean | true if true the parent process will be blocked until all sub processes exit. else it will check if there are processes that had been exited once and return.
$sleep integer when $block is true, it will check sub processes every $sleep minute

Property Details

$processes protected_oe property

process list
protected Process[],Jenner\SimpleFork $processes
Résultat Process[]