Свойство | Type | Description | |
---|---|---|---|
$id | integer | Process identificator | |
$signals | array | ..] |
Свойство | Type | Description | |
---|---|---|---|
$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? |
Méthode | Description | |
---|---|---|
__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 |
Méthode | Description | |
---|---|---|
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 | ||
Résultat | void |
public static ifExistsByPid ( integer $pid ) : boolean | ||
$pid | integer | |
Résultat | boolean | Success |
public isTerminated ( ) : boolean | ||
Résultat | boolean |
protected registerEventSignals ( ) : void | ||
Résultat | void |
protected registerSignals ( ) : void | ||
Résultat | void |
public sighandler ( $signo ) : void | ||
Résultat | void |
protected sigtimedwait ( $signals, $siginfo, integer $sec, double $nano ) : boolean | ||
$sec | integer | |
$nano | double | |
Résultat | boolean | Success |
protected unregisterSignals ( ) : void | ||
Résultat | void |
protected array|Collection[],PHPDaemon\Thread $collections | ||
Résultat | array | |
protected bool $delayedSigReg | ||
Résultat | boolean |
protected array $sigEvents | ||
Résultat | array |
protected bool $terminated | ||
Résultat | boolean |