Skip to content

HTTPReactorServer: use async notification dispatcher for request handling #5378

Description

@matejk

Summary

HTTPReactorServer currently invokes the request handler synchronously on the
SocketReactor thread. A slow handler stalls every other connection bound to
that reactor.

Proposal

Make POCO's existing AsyncNotificationCenter available as an optional
dispatch backend so users can opt into worker-thread handler execution when
they need it. Reactor threads then only do I/O readiness.

Per @aleks-f's feedback: the dispatcher stays synchronous by default
(switching it on globally would spawn extra threads and risk surfacing
thread-unsafe handler code in existing deployments). The setting is explicit
opt-in, configured on the server / HTTPServerParams. When enabled, both
the request side and a future non-blocking response-write path (driven by
WritableNotification) can run async.

No change to the HTTPRequestHandler contract.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions