OverviewFilesCommitsIssuesDocsReleasesPeers

keet-daemon commits / 9d97d1e

CPP-PORT-DESIGN §9.4: storage await decided — (b) async through the libuv thread pool
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9d97d1e1a41bdb31f4ebcb5a2112facf1734e48a
by plankatron <fleeky@gmail.com> · 2026-10-04T18:43:22.000Z

Changed files (1) +4 -1

docs/CPP-PORT-DESIGN.md +4 -1
……@@ -3124,7 +3124,7 @@ injected per layer:
31243124- `resumeVia_`: a resume is `rt::queueMicrotask`.
31253125- `ss::Loop` and `ss::Timers`: ss calls `rt`.
31263126
3127**Open decision — storage await.**
3127**Storage await — DECIDED 2026-10-04 (user): (b), async through the libuv thread pool.**
31283128- **JS:** hypercore-storage awaits rocksdb-native, whose reads and writes complete on libuv's
31293129 thread pool, as callbacks on the loop. So storage completions interleave with network I/O.
31303130- **keetd:** storage is synchronous. That is a documented divergence ("wire order may differ"),
……@@ -3137,6 +3137,9 @@ injected per layer:
31373137
31383138 The choice decides how much of the composed order the gates can compare.
31393139
3140 **(b) chosen.** R4 makes every storage completion a loop callback (the thread pool, as
3141 rocksdb-native does), and every call site a continuation, exactly where JS awaits.
3142
31403143**Migration (each step re-runs every gate and drill):**
31413144- **R1:** `hc::rt`, both the real libuv runtime and the virtual one. Gate: Bare probe scripts
31423145 (microtask vs timer vs immediate vs I/O vs uncaught ordering, as in the 2026-10-04 probe)