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. |
Method | Description | |
---|---|---|
execute ( Channel $channel ) : Generator |
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. |
public kill ( ) |