diff --git a/src/main.zig b/src/main.zig index 960a725..385c898 100644 --- a/src/main.zig +++ b/src/main.zig @@ -48,17 +48,14 @@ const log = std.log.scoped(.relay); pub const default_stack_size = 8 * 1024 * 1024; // -- Io backend selection -- -// Io.Evented (fibers on io_uring): ~35 threads instead of ~2,800 (one per PDS). -// Networking via patched Uring.zig (patches/uring-networking.patch) — implements -// listen, accept, connect, read, write, send via io_uring opcodes. DNS (netLookup) -// is NOT patched; subscribers resolve hostnames through pool_io (Threaded) instead. +// Io.Threaded: one OS thread per io.concurrent() call (~2,800 for PDS subscribers). +// Higher thread count than Evented (~35) but proven stable at 99%+ coverage on 0.15. // -// History: 28 commits of cross-Io fixes (see docs/evented-attempt.md). The -// production SIGSEGV that prompted a brief Threaded revert turned out to be a -// websocket handshake bug (TCP split mid-CRLF), not a fiber issue. Fixed in -// websocket.zig 9ac64da. Evented + ReleaseSafe GPFs immediately on startup -// (same as repro) — must build with ReleaseFast. -const Backend = Io.Evented; +// Evented (io_uring fibers) shelved: 8 crash classes from cross-Io violations, +// ReleaseSafe GPF from fiber context-switch codegen bug, persistent ~10-15% coverage +// degradation, zig team marks Evented as experimental. See docs/evented-attempt.md. +// Can revisit when zig's Evented runtime matures. +const Backend = Io.Threaded; var backend: Backend = undefined; var debug_threaded_io: Io.Threaded = undefined;