summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2026-04-14 22:07:57 +0200
committerChris Boesch <chrboesch@noreply.codeberg.org>2026-04-14 22:07:57 +0200
commite412619d88ee9deea9bfffe3bab57b6608faa828 (patch)
tree8cc326a92ab69405db20812ad8474b77411f89b5 /patches
parentab3c4982261e5f3415bb3192b09a73c4321220fb (diff)
added cancelation if nothing found
Diffstat (limited to 'patches')
-rw-r--r--patches/patches/093_async9.patch13
1 files changed, 4 insertions, 9 deletions
diff --git a/patches/patches/093_async9.patch b/patches/patches/093_async9.patch
index ef18d3f..cb47f76 100644
--- a/patches/patches/093_async9.patch
+++ b/patches/patches/093_async9.patch
@@ -1,9 +1,9 @@
---- exercises/093_async9.zig 2026-04-14 09:50:05.694073287 +0200
-+++ answers/093_async9.zig 2026-04-14 09:49:58.604934765 +0200
-@@ -61,10 +61,10 @@
- var queue = Io.Queue(SearchResult).init(&buf);
+--- exercises/093_async9.zig 2026-04-14 22:06:23.644776893 +0200
++++ answers/093_async9.zig 2026-04-14 22:06:30.606912044 +0200
+@@ -63,10 +63,10 @@
// Launch two workers, each searching half the array.
+ // Remember, we want them to be guaranteed separate units of concurrency.
- var f1 = ???(searchRange, .{ data[0..mid], target, 0, 0, &queue, io });
+ var f1 = try io.concurrent(searchThreshold, .{ io, data[0..mid], threshold, 0, 0, &queue });
defer _ = f1.cancel(io);
@@ -13,8 +13,3 @@
defer _ = f2.cancel(io);
// Wait for the first result.
-@@ -100,4 +100,3 @@
- }
- }
- }
--