PHP 클래스 Jenner\SimpleFork\AbstractPool

파일 보기 프로젝트 열기: huyanping/simple-fork-php

보호된 프로퍼티들

프로퍼티 타입 설명
$processes Process[] process list

공개 메소드들

메소드 설명
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

메소드 상세

aliveCount() 공개 메소드

get the count of running processes
public aliveCount ( ) : integer
리턴 integer

getProcessByPid() 공개 메소드

get process by pid
public getProcessByPid ( $pid ) : null | Process
$pid
리턴 null | Process

isFinished() 공개 메소드

if all processes are stopped
public isFinished ( ) : boolean
리턴 boolean

shutdown() 공개 메소드

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

shutdownForce() 공개 메소드

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

wait() 공개 메소드

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

프로퍼티 상세

$processes 보호되어 있는 프로퍼티

process list
protected Process[],Jenner\SimpleFork $processes
리턴 Process[]