Repository navigation
Overview
Runwire now constructs Swoole applications in their actual workers, so process-bound resources and runtime context belong to the correct worker. The patch also simplifies internal control flow without changing the documented public contracts.
New Features
- Worker-local Swoole applications:
Runtime::serveApplication()andRuntime::serve()construct applications after the host forks. Each worker and replacement receives its own context and metrics, and requests use that worker’s exact context.(Ref: 909b435)
Improvements
- Internal maintainability: Simplifies control flow across networking, HTTP, runtime, and supervisor components while preserving existing behavior and public/protected contracts.
(Ref: 2301169)
Notes
- Swoole application factories now run once per worker, including replacements. Put host-wide setup before serving; create process-bound resources inside the factory. The additive
SwooleDriver::runFactory()path provides worker-local construction, whilerun($application)remains available and leaves process-safety to its caller.(Ref: 909b435)
Full Changelog: 2.1.1...2.1.2