Свойство | Тип | Описание | |
---|---|---|---|
$_current |
Метод | Описание | |
---|---|---|
current ( ) : |
||
fork ( Comos\Qpm\Process\Runnable | Callable $target ) : Comos\Qpm\Process\ChildProcess | ||
getCurrentPid ( ) : integer | ||
getParent ( ) : |
||
getPid ( ) : integer | ||
isCurrent ( ) : boolean | ||
kill ( ) | ||
process ( $pid ) : |
factory method, to produce an instance of Process | |
sendSignal ( $sig ) | ||
terminate ( ) | ||
toBackground ( ) | let current process run in the background |
Метод | Описание | |
---|---|---|
__construct ( $pid, null $parentProcessId = null ) |
protected __construct ( $pid, null $parentProcessId = null ) | ||
$pid | ||
$parentProcessId | null |
public static fork ( Comos\Qpm\Process\Runnable | Callable $target ) : Comos\Qpm\Process\ChildProcess | ||
$target | Comos\Qpm\Process\Runnable | Callable | |
Результат | Comos\Qpm\Process\ChildProcess |
public static getCurrentPid ( ) : integer | ||
Результат | integer |
public getParent ( ) : |
||
Результат | returns null on failure It cannot be realtime in some cases. e.g. $child = Process::current()->folkByCallable($fun); echo $child->getParent()->getPid(); If child process changed the parent, you would get the old parent ID. |
public static process ( $pid ) : |
||
$pid | ||
Результат |
public static toBackground ( ) |