Documentation

ContextWorkerFactory
in package
implements WorkerFactory uses ForbidCloning, ForbidSerialization

FinalYes

The built-in worker factory type.

Table of Contents

Interfaces

WorkerFactory
Interface for factories used to create new workers.

Constants

SCRIPT_PATH  = __DIR__ . "/Internal/task-runner.php"

Properties

$bootstrapPath  : string|null
$contextFactory  : ContextFactory|null

Methods

__construct()  : mixed
__serialize()  : never
__unserialize()  : never
create()  : Worker
The type of worker created depends on the extensions available. If multi-threading is enabled, a WorkerThread will be created. If threads are not available a WorkerProcess will be created.
__clone()  : mixed

Constants

Properties

Methods

__unserialize()

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

create()

The type of worker created depends on the extensions available. If multi-threading is enabled, a WorkerThread will be created. If threads are not available a WorkerProcess will be created.

public create([Cancellation|null $cancellation = null ]) : Worker
Parameters
$cancellation : Cancellation|null = null
Return values
Worker

The newly created worker.


        
On this page

Search results