Skip to content

Commit 922b64a

Browse files
committed
docs(pegboard-runner): explain alloc idx eviction invariant
1 parent 30994fa commit 922b64a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • engine/packages/pegboard-runner/src

engine/packages/pegboard-runner/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ impl CustomServeTrait for PegboardRunnerWsCustomServe {
240240
}
241241
// Clear alloc idx if not evicted
242242
else {
243+
// Eviction implies the replacement connection reused the same runner_id and already
244+
// rewrote the alloc idx, so clearing here would race the new connection.
243245
// Make runner immediately ineligible when it disconnects
244246
let update_alloc_res = self
245247
.ctx

0 commit comments

Comments
 (0)