ThwipHome

Runtime / Type

Epoll

Linux readiness-driven socket handling with explicit connection ownership.

Configuration

[runtime]
type = "epoll"
max_events = 1024

max_events defaults to 1024 and must exceed zero. It caps the readiness notifications returned in one polling batch, not the total number of connections.

How it behaves

The worker registers listeners and connections with epoll, receives readiness notifications, and performs nonblocking accept, read, and write work. Error, hang-up, and peer half-close flags are handled alongside normal readiness. Connection tokens carry generations so stale events cannot act on a reused slot.

Use epoll when

Start with the default event batch. Raise it only after observing sustained batches at the cap; a larger value can increase work per loop turn.