Feature release: a new opt-in knob to drop the per-request async scope on hot paths.
Added
-
HttpServerConfig::setRequestScope(bool)/isRequestScope()— opt out of the
per-request child async scope (default on, behaviour unchanged). When off, each
H1/H2/H3 handler coroutine reuses the connection scope directly instead of minting a
fresh per-request child, saving two allocations (emalloc/efree) per request. The
setter is chainable and locks once the config is handed to a server.Disabling it means
Async\request_context()resolves to null for that request
(use the?->operator) — there is no per-request context subtree. Only disable it
for handlers that never rely on per-request context (e.g. throughput benchmarks). The
knob propagates correctly acrosssetWorkers(N > 1)via the cross-thread shared-config
snapshot.
Tests
server/core/049-request-scope-setter— default / toggle / chainable / locked-guard,
plus scope-OFF serving withAsync\request_context()asserted null.server/core/050-request-scope-workers— the knob is honoured on worker threads
(setWorkers(2)), guarding the shared-config propagation path.
Also folds in 0.7.1 (HTTP/3 bidi stream-credit fix, #79), which shipped tagged but
without a changelog entry.