test(acl): correct the array-cell comment — captured locals do take ref (re-review nit)

This commit is contained in:
Joseph Doherty
2026-08-18 07:13:16 -04:00
parent 1765e30063
commit e29fab19f6
@@ -578,9 +578,9 @@ public sealed class SessionAclDecisionCacheTests(ITestOutputHelper output)
const int rounds = 10_000; const int rounds = 10_000;
const int spinsBeforeYield = 4_000; const int spinsBeforeYield = 4_000;
// Array-as-ref-cell: a one-element array is the cheapest storage a lambda can close over AND that // Array-as-ref-cell: the one cell that is re-seated every round (a fresh cache per round), shared
// Volatile.Read/Write can take a `ref` to — a captured local cannot be passed by ref, and a plain // by the starter and both racers. A captured local would also take `ref` (gate/finished below do
// field would need the test moved onto the class. // exactly that) — the array is a readability choice marking the re-seated slot, not a necessity.
var slot = new SessionAclDecisionCache[1]; var slot = new SessionAclDecisionCache[1];
var gate = 0; // starter's release signal: the round number both racers are cleared to run var gate = 0; // starter's release signal: the round number both racers are cleared to run
var finished = 0; // racers' completion count for the current round var finished = 0; // racers' completion count for the current round