diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 23:01:05 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 00:57:13 -0300 |
| commit | 6a665eb3d9b6542bc1765f57f19cd2fc8ce04e82 (patch) | |
| tree | bdb3a1aacbcf1d9a4ecece334a7715fe051a965e | |
| parent | 406f9809cd69c1bcd69cdfc752b32e2a2e4e76c0 (diff) | |
| download | pardes-6a665eb3d9b6542bc1765f57f19cd2fc8ce04e82.tar.gz pardes-6a665eb3d9b6542bc1765f57f19cd2fc8ce04e82.zip | |
9p_io: Client.said, the peer's words lastSaid answers, is threadlocal: the editor's mounts and a Handover job wrote and read the one global from two threads, and each caller reads it on the thread its own failed call ran on
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
| -rw-r--r-- | src/9p_io.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig index 7ae341bd..ab7dd13f 100644 --- a/src/9p_io.zig +++ b/src/9p_io.zig @@ -2427,8 +2427,9 @@ pub const Client = struct { } /// The peer's own words for the last error.Remote a read or write here - /// got (its Rerror), for a caller that says why. - var said: RemoteError = .{}; + /// got (its Rerror), for a caller that says why: this thread's, as the + /// editor's mounts and a Handover job each ask from their own. + threadlocal var said: RemoteError = .{}; pub fn lastSaid() []const u8 { return said.buf[0..said.len]; } |
