summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2026-04-01 22:31:48 +0200
committerChris Boesch <chrboesch@noreply.codeberg.org>2026-04-01 22:31:48 +0200
commit6d89dcd2dec3654b754012f0411d36975e1dc7b2 (patch)
treed74d744203374f3e862180519a369ce4a2a843dc /patches
parent77d3b684cb467ad4e06c211518e2d2d1c7346ad1 (diff)
revival of the async-io functions
Diffstat (limited to 'patches')
-rw-r--r--patches/patches/084_async.patch11
-rw-r--r--patches/patches/085_async2.patch14
2 files changed, 25 insertions, 0 deletions
diff --git a/patches/patches/084_async.patch b/patches/patches/084_async.patch
new file mode 100644
index 0000000..2c97f0e
--- /dev/null
+++ b/patches/patches/084_async.patch
@@ -0,0 +1,11 @@
+--- exercises/084_async.zig 2026-04-01 20:40:08.904999609 +0200
++++ answers/084_async.zig 2026-04-01 20:40:05.641933231 +0200
+@@ -37,7 +37,7 @@
+ const std = @import("std");
+
+ pub fn main(init: std.process.Init) !void {
+- const io = init.???;
++ const io = init.io;
+
+ // Get the current wall-clock time using the Io interface.
+ // Hint: Timestamp.now() takes an Io and a Clock type (.real = wall clock).
diff --git a/patches/patches/085_async2.patch b/patches/patches/085_async2.patch
new file mode 100644
index 0000000..7583d7c
--- /dev/null
+++ b/patches/patches/085_async2.patch
@@ -0,0 +1,14 @@
+--- exercises/085_async2.zig 2026-04-01 19:22:50.017227542 +0200
++++ answers/085_async2.zig 2026-04-01 19:21:57.569158481 +0200
+@@ -38,9 +38,9 @@
+
+ // Now collect the result. What method on Future gives us
+ // the value, blocking if it isn't ready yet?
+- const answer = future.???(io);
++ const answer = future.await(io);
+
+- std.debug.print("The answer is: {}\n", .{answer});
++ std.debug.print("the answer is: {}\n", .{answer});
+ }
+
+ fn computeAnswer(a: u32, b: u32) u32 {