From 3c77dc458ad1f18fbd03a2170fda770ab114ae48 Mon Sep 17 00:00:00 2001 From: Eric Joldasov Date: Sun, 9 Feb 2025 14:16:36 +0500 Subject: [PATCH] replace deprecated `std.Atomic(T).fence` with `load` See https://github.com/ziglang/zig/pull/21585 . I went with second option listed in `Conditional Barriers` section. Signed-off-by: Eric Joldasov --- src/sink.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sink.zig b/src/sink.zig index e04dd7f..15adb8c 100644 --- a/src/sink.zig +++ b/src/sink.zig @@ -162,7 +162,7 @@ pub const Dir = struct { pub fn unref(d: *Dir, t: *Thread) void { if (d.refcnt.fetchSub(1, .release) != 1) return; - d.refcnt.fence(.acquire); + _ = d.refcnt.load(.acquire); switch (d.out) { .mem => |*m| m.final(if (d.parent) |p| &p.out.mem else null),