From ffde357f303e7459a12cfe4b785ae9e8ef9ebe30 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Thu, 2 Apr 2026 10:38:45 +0200 Subject: revival of the async-io functions, #90 --- patches/patches/090_async7.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/patches/090_async7.patch (limited to 'patches') diff --git a/patches/patches/090_async7.patch b/patches/patches/090_async7.patch new file mode 100644 index 0000000..2108d51 --- /dev/null +++ b/patches/patches/090_async7.patch @@ -0,0 +1,13 @@ +--- exercises/090_async7.zig 2026-04-02 10:36:42.910708919 +0200 ++++ answers/090_async7.zig 2026-04-02 10:36:51.965884223 +0200 +@@ -49,8 +49,8 @@ + for (0..times) |_| { + // Acquire the lock before modifying shared state. + // What Mutex method blocks until the lock is acquired? +- state.mutex.??? catch return; +- defer state.mutex.unlock(); // <-- what's missing here? ++ state.mutex.lock(io) catch return; ++ defer state.mutex.unlock(io); + + state.counter += 1; + } -- cgit v1.2.3