프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$id | integer | Process identificator | |
$signals | array | ..] |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$collections | array | |
Collections of childrens | |
$delayedSigReg | boolean | If true, we do not register signals automatically at start | |
$pid | integer | PID | |
$shutdown | boolean | Is this thread shutdown? | |
$sigEvents | array | Storage of signal handler events | |
$terminated | boolean | Is this thread terminated? |
메소드 | 설명 | |
---|---|---|
__invoke ( ) : void | Invoke magic method | |
eventSighandler ( $fd, $arg ) : void | Called when a signal caught through libevent. | |
getId ( ) : integer | Get ID of this Thread | |
getPid ( ) : integer | Get PID of this Thread | |
ifExists ( ) : boolean | Checks if this process does exist | |
ifExistsByPid ( integer $pid ) : boolean | Checks if given process ID does exist | |
isTerminated ( ) : boolean | Is this thread terminated? | |
setId ( $id ) : void | Set ID of this Thread | |
setTerminated ( ) | ||
sighandler ( $signo ) : void | Called when the signal is caught | |
signal ( $sig ) : boolean | Sends arbitrary signal to the process | |
sleep ( $s ) : boolean | Delays the process execution for the given number of seconds | |
start ( $clearstack = true ) : void | Starts the process | |
stop ( $kill = false ) : void | Terminates the process |
메소드 | 설명 | |
---|---|---|
backsig ( $sig ) : boolean | Sends the signal to parent process | |
getTitle ( ) : string | Returns a title of the current process | |
onTerminated ( ) | ||
registerEventSignals ( ) : void | Register signals. | |
registerSignals ( ) : void | Registers signals | |
run ( ) : void | Run thread process | |
setTitle ( string $title ) : boolean | Sets a title of the current process | |
shutdown ( ) : void | Shutdowns the current process properly | |
sigchld ( ) : void | Called when the signal SIGCHLD caught | |
sigint ( ) : void | Called when the signal SIGINT caught | |
sigkill ( ) : void | Called when the signal SIGKILL caught | |
sigquit ( ) : void | Called when the signal SIGTERM caught | |
sigterm ( ) : void | Called when the signal SIGTERM caught | |
sigtimedwait ( $signals, $siginfo, integer $sec, double $nano ) : boolean | Implementation of pcntl_sigtimedwait for Mac. | |
sigwait ( $sec, $nano = 300000000 ) : boolean | Waits for signals, with a timeout | |
unregisterSignals ( ) : void | Unregister signals. | |
waitAll ( boolean $check ) : void | Waits until children is alive | |
waitPid ( ) : boolean | Checks for SIGCHLD |
public eventSighandler ( $fd, $arg ) : void | ||
리턴 | void |
public static ifExistsByPid ( integer $pid ) : boolean | ||
$pid | integer | |
리턴 | boolean | Success |
protected sigtimedwait ( $signals, $siginfo, integer $sec, double $nano ) : boolean | ||
$sec | integer | |
$nano | double | |
리턴 | boolean | Success |
protected array|Collection[],PHPDaemon\Thread $collections | ||
리턴 | array | |
protected bool $delayedSigReg | ||
리턴 | boolean |