PHP Class XPSPL\Process

A process is the callable which will execute when a signal is emitted.
Exibir arquivo Open project: prggmr/xpspl Class Usage Examples

Public Properties

Property Type Description
$thread_vars

Protected Properties

Property Type Description
$_callable The callable that will execute.
$_exhaustion integer | null Process exhaustion.
$_priority integer Process priority.
$_threads boolean Threads enabled for this process.

Public Methods

Method Description
__construct ( mixed $callable = null, integer $exhaust = XPSPL_PROCESS_DEFAULT_EXHAUST, null | integer $priority = XPSPL_PROCESS_DEFAULT_PRIORITY ) : void Constructs a new process object.
__toString ( ) : string Return a string representation of this database.
decrement_exhaust ( ) : void Decrements the exhaustion counter.
enable_threads ( ) : void Enable threads for this process.
exhaustion ( ) : integer Returns count until process becomes exhausted
get_function ( ) : closure | array Returns the function for the process.
get_priority ( ) : integer Returns the priority of the process.
get_thread ( $signal = null ) Returns the thread to run this process.
is_exhausted ( ) : boolean Determines if the process has exhausted.
set_exhaust ( integer $rate ) : void Sets the process exhaust rate.
set_priority ( integer $priority ) : void Sets the process priority.
threads_enabled ( ) : boolean Returns if threads are enabled for this process.

Method Details

__construct() public method

Constructs a new process object.
public __construct ( mixed $callable = null, integer $exhaust = XPSPL_PROCESS_DEFAULT_EXHAUST, null | integer $priority = XPSPL_PROCESS_DEFAULT_PRIORITY ) : void
$callable mixed A callable php variable.
$exhaust integer Count to set process exhaustion.
$priority null | integer Priority of the process.
return void

__toString() public method

Return a string representation of this database.
public __toString ( ) : string
return string

decrement_exhaust() final public method

Decrements the exhaustion counter.
final public decrement_exhaust ( ) : void
return void

enable_threads() final public method

Enable threads for this process.
final public enable_threads ( ) : void
return void

exhaustion() final public method

Returns count until process becomes exhausted
final public exhaustion ( ) : integer
return integer

get_function() final public method

Returns the function for the process.
final public get_function ( ) : closure | array
return closure | array

get_priority() final public method

Returns the priority of the process.
final public get_priority ( ) : integer
return integer

get_thread() public method

Returns the thread to run this process.
public get_thread ( $signal = null )

is_exhausted() final public method

Determines if the process has exhausted.
final public is_exhausted ( ) : boolean
return boolean

set_exhaust() final public method

Sets the process exhaust rate.
final public set_exhaust ( integer $rate ) : void
$rate integer Exhaust rate
return void

set_priority() final public method

Sets the process priority.
final public set_priority ( integer $priority ) : void
$priority integer Integer Priority
return void

threads_enabled() public method

Returns if threads are enabled for this process.
public threads_enabled ( ) : boolean
return boolean

Property Details

$_callable protected_oe property

The callable that will execute.
protected $_callable

$_exhaustion protected_oe property

Process exhaustion.
protected int|null $_exhaustion
return integer | null

$_priority protected_oe property

Process priority.
protected int $_priority
return integer

$_threads protected_oe property

Threads enabled for this process.
protected bool $_threads
return boolean

$thread_vars public_oe property

public $thread_vars