Documentation

ThreadContextFactory
in package
implements ContextFactory uses ForbidCloning, ForbidSerialization

FinalYes

Table of Contents

Interfaces

ContextFactory

Properties

$childConnectTimeout  : int
$ipcHub  : IpcHub

Methods

__construct()  : mixed
__serialize()  : never
__unserialize()  : never
start()  : ThreadContext
Creates a new execution context.
__clone()  : mixed

Properties

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.

__unserialize()

public final __unserialize(array<string|int, mixed> $data) : never
Parameters
$data : array<string|int, mixed>
Return values
never

start()

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

        
On this page

Search results