Kept-call pace read once and atomically: no data race with the kept calls reading it

ReadPace wrote the pace at every Connect and Serve while kept calls on other
goroutines read it. The pace is now held atomically and read once at the
start: a later read of the same pace changes nothing, one of another pace is
refused naming both. KeptPace becomes a function.

Builds: design 47 H2 §782, §775
This commit is contained in:
2026-11-22 02:21:53 +01:00
parent 03e2aca59f
commit 4e338436da
3 changed files with 83 additions and 34 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ func (c *Conn) CallOn(node, key string, body any) (json.RawMessage, error) {
// CallKept is Call for a call whose answer the caller keeps and which is safe to make again (a read, or a write the
// callee deduplicates): mesh-sdk's kept-call form (design 47 H2 §775), asked again through a transport fault, a timeout
// or no responders at the kept-call pace (busretry.KeptPace, jittered), whether or not the bus is blacked out, until it
// or no responders at the kept-call pace (busretry.KeptPace(), jittered), whether or not the bus is blacked out, until it
// is answered or busretry.Bound has passed (novox/hq ADR 0668, extending ADR 0615 §6; issue 1966). A refusal returns at
// once. A caller with an ask id and a bound of its own uses CallKeptAsk.
func (c *Conn) CallKept(key string, body any) (json.RawMessage, error) {