You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Things left to do or decide after #2617 and its stack, so they don't get lost.
Validate a configuration before stopping the running one: Start() calls Init() after the old app stopped, so any declaration error leaves the site down while Caddy rolls the configuration back. A side-effect-free preflight shared with Init(), called from Validate(). feat: declared background workers + frankenphp_get_worker_handle() #2617 (comment)
Recycle the task handles: measured and dropped. A per-thread pool of the per-side state benches flat against feat: SentTaskHandle and ReceivedTaskHandle #2636 (39.1 -> 38.7us a task, throughput within 1.4% either way, 15.4 syscalls on both sides, fork run 35466429028), since the engine already recycles the object slot and what is left is one 72-byte block per side.
Give macOS the channel Linux gets from eventfd: done in feat: SentTaskHandle and ReceivedTaskHandle #2636 with a kqueue descriptor carrying an EVFILT_USER event, one per side. Measured on a macos-latest runner before writing it, per wake-up round trip: socketpair 16.1us, two pipes 14.0us, kqueue 11.7us, the same quarter eventfd takes off the pair on Linux (23.1 -> 17.5us on the same runner class). Windows keeps the socket pair for php_select().
Things left to do or decide after #2617 and its stack, so they don't get lost.
Validate a configuration before stopping the running one:
Start()callsInit()after the old app stopped, so any declaration error leaves the site down while Caddy rolls the configuration back. A side-effect-free preflight shared withInit(), called fromValidate(). feat: declared background workers + frankenphp_get_worker_handle() #2617 (comment)Synchronize the startup-failure boundary: publishing
ShuttingDownwakes the startup waiter before the thread finished its exit path, and a shutdown request is not distinguished from a thread that exited. Both worker handlers share that path. feat: declared background workers + frankenphp_get_worker_handle() #2617 (comment)Pull the rest of the common bookkeeping into
workerLifecycleonce that boundary has one shape. feat: declared background workers + frankenphp_get_worker_handle() #2617 (comment)num_regular_threads/max_regular_threads, so nobody computes the thread budget by hand. feat: declared background workers + frankenphp_get_worker_handle() #2617 (comment)Implement
Io\Poll\HandleonFrankenPHP\WorkerHandleand the task handles, done in feat: declared background workers + frankenphp_get_worker_handle() #2617 and feat: SentTaskHandle and ReceivedTaskHandle #2636 on top of the 8.6 job of ci: run the tests against PHP 8.6 as an experimental job #2658Make the per-task
php_streamof feat: SentTaskHandle and ReceivedTaskHandle #2636 optional: the state of each side moved onto its handle, the task settles in the handle's cleanup, andgetStream()builds the stream on demand, so a script waiting through a context allocates neither a stream nor a resource per task. Done in feat: SentTaskHandle and ReceivedTaskHandle #2636.Recycle the task handles: measured and dropped. A per-thread pool of the per-side state benches flat against feat: SentTaskHandle and ReceivedTaskHandle #2636 (39.1 -> 38.7us a task, throughput within 1.4% either way, 15.4 syscalls on both sides, fork run 35466429028), since the engine already recycles the object slot and what is left is one 72-byte block per side.
Give macOS the channel Linux gets from eventfd: done in feat: SentTaskHandle and ReceivedTaskHandle #2636 with a kqueue descriptor carrying an
EVFILT_USERevent, one per side. Measured on a macos-latest runner before writing it, per wake-up round trip: socketpair 16.1us, two pipes 14.0us, kqueue 11.7us, the same quarter eventfd takes off the pair on Linux (23.1 -> 17.5us on the same runner class). Windows keeps the socket pair forphp_select().