summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2026-04-14 12:43:29 +0200
committerChris Boesch <chrboesch@noreply.codeberg.org>2026-04-14 12:43:29 +0200
commitf10c3d4e7a5cbf69883a58682cc1f4350e42ca39 (patch)
tree10f196624483cf562d4766552b8027acf147c4ff /patches
parentb8a639e79836f916286c8d55e53a263cd782e8ab (diff)
parent152f3a6113b859f20abf55fa11833b72a1abf128 (diff)
Merge branch 'main' into 95-bug4
Diffstat (limited to 'patches')
-rw-r--r--patches/patches/093_async9.patch29
-rw-r--r--patches/patches/108_threading2.patch4
2 files changed, 21 insertions, 12 deletions
diff --git a/patches/patches/093_async9.patch b/patches/patches/093_async9.patch
index ad81f00..ef18d3f 100644
--- a/patches/patches/093_async9.patch
+++ b/patches/patches/093_async9.patch
@@ -1,11 +1,20 @@
---- exercises/093_async9.zig 2026-04-13 17:55:35.567204530 +0200
-+++ answers/093_async9.zig 2026-04-13 18:05:05.636355044 +0200
-@@ -43,7 +43,7 @@
- // Launch with a guaranteed separate unit of concurrency.
- // Which Io method guarantees this?
- // (Hint: unlike io.async, this one can fail!)
-- var future = try io.???(compute, .{io});
-+ var future = try io.concurrent(compute, .{io});
- defer _ = future.cancel(io);
+--- 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);
- // Note: All breaks in this exercise (using sleep)
+ // Launch two workers, each searching half the array.
+- 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);
+
+- var f2 = ???(searchRange, .{ data[mid..], target, mid, 1, &queue, io });
++ var f2 = try io.concurrent(searchThreshold, .{ io, data[mid..], threshold, mid, 1, &queue });
+ defer _ = f2.cancel(io);
+
+ // Wait for the first result.
+@@ -100,4 +100,3 @@
+ }
+ }
+ }
+-
diff --git a/patches/patches/108_threading2.patch b/patches/patches/108_threading2.patch
index d71f254..c06a985 100644
--- a/patches/patches/108_threading2.patch
+++ b/patches/patches/108_threading2.patch
@@ -1,5 +1,5 @@
---- exercises/108_threading2.zig 2025-08-15 15:17:57.839348063 +0200
-+++ answers/108_threading2.zig 2026-04-02 10:51:15.811831656 +0200
+--- exercises/108_threading2.zig 2026-04-14 06:44:18.848246237 +0200
++++ answers/108_threading2.zig 2026-04-14 08:15:30.894485037 +0200
@@ -81,8 +81,8 @@
defer handle1.join();