http.server.serve_all

http.server

serve_all(servers, opts) -> ok, err

Serve one or more server instances in a single LEV event loop.

Enters the LEV event loop once for all given server instances: registers the loop-global signal handlers, binds and attaches every listener, and starts a shared housekeeping coroutine. SIGTERM sets the shutdown flag on every server; accept loops drain within their accept timeout and a 5s timer stops the loop for stragglers.

opts.on_start is called inside the loop after all listeners are bound — the place for applications to spawn their own periodic coroutines.