Skip to content

Commit d0ecd12

Browse files
committed
Lock-free thread worker event loop with exhaustion protection and backpressure
Replace RLock-based synchronization with PollableMethodQueue (pipe-based method deferral) so all poller and keepalive operations run on the main thread without locks. Unified single poller.select() loop replaces the dual-path poller.select() + futures.wait() pattern. Add settimeout(KEEPALIVE) on new connections to prevent slow clients from holding thread pool slots indefinitely. Add set_accept_enabled() to stop accepting connections when at WORKER_CONNECTIONS capacity.
1 parent da06bea commit d0ecd12

File tree

2 files changed

+190
-116
lines changed

2 files changed

+190
-116
lines changed

0 commit comments

Comments
 (0)