improvements for async-io

This commit is contained in:
Chris Boesch
2026-04-05 12:42:42 +02:00
parent 58f8df66d5
commit 2acf192775
2 changed files with 24 additions and 18 deletions

View File

@@ -1,11 +1,11 @@
--- exercises/086_async2.zig 2026-04-03 19:42:15.274532915 +0200
+++ answers/086_async2.zig 2026-04-03 21:30:18.180019206 +0200
@@ -38,7 +38,7 @@
--- exercises/086_async2.zig 2026-04-05 12:41:11.350626443 +0200
+++ answers/086_async2.zig 2026-04-05 12:42:00.879791167 +0200
@@ -44,7 +44,7 @@
// Now collect the result. What method on Future gives us
// the value, blocking if it isn't ready yet?
// the value, blocking until it's ready?
- const answer = future.???(io);
+ const answer = future.await(io);
std.debug.print("The answer is: {}\n", .{answer});
print("The answer is: {}\n", .{answer});
}