PHP Class Icicle\Concurrent\Threading\Internal\Thread

Inheritance: extends Thread
Mostrar archivo Open project: icicleio/concurrent Class Usage Examples

Public Methods

Method Description
__construct ( resource $socket, callable $function, array $args = [] ) Creates a new thread object.
kill ( ) Sets a local variable to true so the running event loop can check for a kill signal.
run ( ) Runs the thread code and the initialized function.

Private Methods

Method Description
execute ( Channel $channel ) : Generator

Method Details

__construct() public method

Creates a new thread object.
public __construct ( resource $socket, callable $function, array $args = [] )
$socket resource IPC communication socket.
$function callable The function to execute in the thread.
$args array Arguments to pass to the function.

kill() public method

Sets a local variable to true so the running event loop can check for a kill signal.
public kill ( )

run() public method

Runs the thread code and the initialized function.
public run ( )