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 ways to send/receive frames and to terminate the worker.
folk-runtime-pipe (phase 4) implements this trait by spawning real PHP
processes via execve. folk-runtime-fork (phase 10) implements it via
prefork. Tests use MockRuntime below.
Structs§
- Mock
Runtime - In-memory runtime used in tests. Each spawned worker is a
MockWorkerthat returns canned responses for any task-channel request. - Mock
Worker - In-memory worker used by
MockRuntime.
Traits§
- Runtime
- Spawns workers per a runtime-specific strategy.
- Worker
Handle - A handle to a spawned worker.