From 6a665eb3d9b6542bc1765f57f19cd2fc8ce04e82 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 23:01:05 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/9p_io.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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]; } -- cgit v1.3