Repository navigation
docs(design): DASYNC.1 daemon accept loop + worker spawn inventory - #5624
Merged
Merged
Conversation
Inventory the synchronous, thread-per-connection daemon accept loop with file:line anchors for the listener bind, accept loop body, worker spawn primitive, per-connection state hand-off, TLS/LSM/--max-connections overlays, and worker cleanup. Audit-only; unblocks DASYNC.2 (#3983) design of the tokio-based async listener and DASYNC.5 (#3986) 5K/10K bench that closes D10K-3/4/5.
oferchen
force-pushed
the
docs/dasync-1-daemon-accept-loop-inventory
branch
from
June 10, 2026 19:39
2632645 to
33eab86
Compare
2 of 4 tasks
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…5624) Inventory the synchronous, thread-per-connection daemon accept loop with file:line anchors for the listener bind, accept loop body, worker spawn primitive, per-connection state hand-off, TLS/LSM/--max-connections overlays, and worker cleanup. Audit-only; unblocks DASYNC.2 (#3983) design of the tokio-based async listener and DASYNC.5 (#3986) 5K/10K bench that closes D10K-3/4/5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
file:lineanchors for the listener bind, accept loop, worker spawn primitive, per-connection state hand-off, TLS / LSM /--max-connectionsoverlays, and worker cleanup.daemon-async-accept) -> DASYNC.4 (docs(audits): compatibility-flags matrix audit #3985 bridge) -> DASYNC.5 (test(engine): add adaptive buffer controller convergence tests #3986 5K/10K bench; closes D10K-3/4/5).Key findings
serve_connections()atcrates/daemon/src/daemon/sections/server_runtime/accept_loop.rs:11, with the worker spawn atcrates/daemon/src/daemon/sections/server_runtime/connection.rs:189 spawn_connection_worker()usingstd::thread::spawn+std::panic::catch_unwind(noBuilder::stack_size).crates/daemon/src/async_listener.rs:73 run_hybrid_listener()behind theasync-daemonfeature, but the worker closure atcrates/daemon/src/daemon.rs:411-418drops on accept instead of dispatching tohandle_session(). DASYNC.3 needs to wire the realSyncWorker.asyncandasync-daemon); DASYNC.2 must decide whether to collapse them.refuse_if_at_capacity()atconnection.rs:124runs after TLS wrap and before worker spawn; under the async target shape this should become a tokioSemaphore/ boundedmpscso the accept loop awaits permits instead of refusing eagerly (eager refusal must remain available for byte-exact@ERROR:wire parity).vm.max_map_count = 65530on Linux 64-bit.Cross-references
spawn_blockingbridge ceiling for DASYNC.3 wiring.Test plan
file:lineanchors verified against the tree at the audit commit.