PHP 클래스 Icicle\Concurrent\Forking\Fork

상속: implements Icicle\Concurrent\Sync\ChannelInterface, implements Icicle\Concurrent\ProcessInterface
파일 보기 프로젝트 열기: icicleio/concurrent 1 사용 예제들

공개 메소드들

메소드 설명
__clone ( )
__construct ( callable $function, $args )
__destruct ( )
enabled ( ) : boolean Checks if forking is enabled.
getPid ( ) : integer Gets the forked process's process ID.
getPriority ( ) : float Gets the fork's scheduling priority as a percentage.
isRunning ( ) : boolean Checks if the context is running.
join ( ) : Generator
kill ( )
receive ( ) : Generator
send ( $data ) : Generator
setPriority ( float $priority ) : float Sets the fork's scheduling priority as a percentage.
signal ( integer $signo )
spawn ( callable $function, $args ) : self Spawns a new forked process and runs it.
start ( ) Starts the context execution.

비공개 메소드들

메소드 설명
execute ( Channel $channel ) : Generator

메소드 상세

__clone() 공개 메소드

public __clone ( )

__construct() 공개 메소드

public __construct ( callable $function, $args )
$function callable

__destruct() 공개 메소드

public __destruct ( )

enabled() 공개 정적인 메소드

Checks if forking is enabled.
public static enabled ( ) : boolean
리턴 boolean True if forking is enabled, otherwise false.

getPid() 공개 메소드

Gets the forked process's process ID.
public getPid ( ) : integer
리턴 integer The process ID.

getPriority() 공개 메소드

The priority is a float between 0 and 1 that indicates the relative priority for the forked process, where 0 is very low priority, 1 is very high priority, and 0.5 is considered a "normal" priority. The value is based on the forked process's "nice" value. The priority affects the operating system's scheduling of processes. How much the priority actually affects the amount of CPU time the process gets is ultimately system-specific.
또한 보기: Fork::setPriority()
또한 보기: http://linux.die.net/man/2/getpriority
public getPriority ( ) : float
리턴 float A priority value between 0 and 1.

isRunning() 공개 메소드

Checks if the context is running.
public isRunning ( ) : boolean
리턴 boolean True if the context is running, otherwise false.

join() 공개 메소드

public join ( ) : Generator
리턴 Generator

kill() 공개 메소드

public kill ( )

receive() 공개 메소드

public receive ( ) : Generator
리턴 Generator

send() 공개 메소드

public send ( $data ) : Generator
리턴 Generator

setPriority() 공개 메소드

Note that on many systems, only the superuser can increase the priority of a process.
또한 보기: Fork::getPriority()
public setPriority ( float $priority ) : float
$priority float A priority value between 0 and 1.
리턴 float

signal() 공개 메소드

public signal ( integer $signo )
$signo integer

spawn() 공개 정적인 메소드

Spawns a new forked process and runs it.
public static spawn ( callable $function, $args ) : self
$function callable A callable to invoke in the process.
리턴 self The process object that was spawned.

start() 공개 메소드

Starts the context execution.
public start ( )