Skip to main content

Module runtime

Module runtime 

Source
Expand description

Abstraction over how PHP workers are spawned.

WorkerPool does not know what a PHP process is. It asks the Runtime to spawn a worker; the runtime returns a WorkerHandle which gives the pool a way to execute requests and to terminate the worker.

In phase 23 (extension mode), the runtime spawns OS threads that run PHP inside the same process. Communication is via channels (zero IPC).

Structs§

MockRuntime
In-memory runtime used in tests. Each spawned worker echoes requests back.
MockWorker
In-memory worker used by MockRuntime.

Traits§

Runtime
Spawns workers per a runtime-specific strategy.
WorkerHandle
A handle to a spawned worker.