PHP Class Comos\Qpm\Process\Process

Afficher le fichier Open project: comos/qpm Class Usage Examples

Protected Properties

Свойство Type Description
$_current Process

Méthodes publiques

Méthode Description
current ( ) : Process
fork ( Comos\Qpm\Process\Runnable | Callable $target ) : Comos\Qpm\Process\ChildProcess
getCurrentPid ( ) : integer
getParent ( ) : Process
getPid ( ) : integer
isCurrent ( ) : boolean
kill ( )
process ( $pid ) : Process factory method, to produce an instance of Process
sendSignal ( $sig )
terminate ( )
toBackground ( ) let current process run in the background

Méthodes protégées

Méthode Description
__construct ( $pid, null $parentProcessId = null )

Method Details

__construct() protected méthode

protected __construct ( $pid, null $parentProcessId = null )
$pid
$parentProcessId null

current() public static méthode

public static current ( ) : Process
Résultat Process

fork() public static méthode

public static fork ( Comos\Qpm\Process\Runnable | Callable $target ) : Comos\Qpm\Process\ChildProcess
$target Comos\Qpm\Process\Runnable | Callable
Résultat Comos\Qpm\Process\ChildProcess

getCurrentPid() public static méthode

public static getCurrentPid ( ) : integer
Résultat integer

getParent() public méthode

public getParent ( ) : Process
Résultat Process 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.

getPid() public méthode

public getPid ( ) : integer
Résultat integer

isCurrent() public méthode

public isCurrent ( ) : boolean
Résultat boolean

kill() public méthode

public kill ( )

process() public static méthode

factory method, to produce an instance of Process
public static process ( $pid ) : Process
$pid
Résultat Process

sendSignal() public méthode

public sendSignal ( $sig )

terminate() public méthode

public terminate ( )

toBackground() public static méthode

let current process run in the background
public static toBackground ( )

Property Details

$_current protected_oe static_oe property

protected static Process,Comos\Qpm\Process $_current
Résultat Process