ThreadContextFactory
in package
implements
ContextFactory
uses
ForbidCloning, ForbidSerialization
FinalYes
Table of Contents
Interfaces
Properties
- $childConnectTimeout : int
- $ipcHub : IpcHub
Methods
- __construct() : mixed
- __serialize() : never
- __unserialize() : never
- start() : ThreadContext
- Creates a new execution context.
- __clone() : mixed
Properties
$childConnectTimeout read-only
private
int
$childConnectTimeout
= 5
$ipcHub read-only
private
IpcHub
$ipcHub
= new LocalIpcHub()
Methods
__construct()
public
__construct([positive-int $childConnectTimeout = 5 ][, IpcHub $ipcHub = new LocalIpcHub() ]) : mixed
Parameters
- $childConnectTimeout : positive-int = 5
-
Number of seconds the child will attempt to connect to the parent before failing.
- $ipcHub : IpcHub = new LocalIpcHub()
-
Optional IpcHub instance.
__serialize()
public
final __serialize() : never
Return values
never__unserialize()
public
final __unserialize(array<string|int, mixed> $data) : never
Parameters
- $data : array<string|int, mixed>
Return values
neverstart()
Creates a new execution context.
public
start(array<string|int, mixed>|string $script[, Cancellation|null $cancellation = null ]) : ThreadContext
Parameters
- $script : array<string|int, mixed>|string
-
Path to PHP script or array with first element as path and following elements as options to the PHP script (e.g.: ['bin/worker', 'ArgumentValue', '--option', 'OptionValue'].
- $cancellation : Cancellation|null = null
Return values
ThreadContext__clone()
protected
final __clone() : mixed