review-003 doc items: S-1/N-1/N-2/N-3 — the accepted-residual posture notes
This commit is contained in:
1 parent
d51ea8a262
commit
87afe706de
3 files changed
+31
-6
No files matched your search
@@ -133,9 +133,12 @@ impl ProducerDoorBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
/// The max-concurrent-sessions cap (ADR-014 knob 2): an accept
|
||||
/// beyond the bound is refused door-side — the socket is closed
|
||||
/// immediately, no session spawned.
|
||||
/// The max-concurrent-*connections* cap (ADR-014 knob 2; review
|
||||
/// 003 N-3's naming — the mechanism bounds accepted connections,
|
||||
/// including ones past the idle gate that are merely slow
|
||||
/// readers, not active RFC sessions): an accept beyond the bound
|
||||
/// is refused door-side — the socket is closed immediately, no
|
||||
/// session spawned.
|
||||
pub fn max_sessions(mut self, cap: usize) -> Self {
|
||||
self.max_sessions = Some(cap);
|
||||
self
|
||||
@@ -191,6 +194,10 @@ impl ProducerDoorGuard {
|
||||
/// they own their sockets and finish with their clients (per-
|
||||
/// connection isolation cuts both ways). Returns the loop task's
|
||||
/// fatal outcome, if any (`None` = the loop ended by close).
|
||||
///
|
||||
/// The receiver is dropped before the await — the loop's
|
||||
/// `done_tx.closed()` fires only when every receiver is gone;
|
||||
/// holding it across the await would deadlock the graceful stop.
|
||||
pub async fn close(mut self) -> Option<std::io::Error> {
|
||||
self.done_rx = None;
|
||||
let task = self.task.take();
|
||||
|
||||
Reference in new issue
Block a user