mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
improvements for async-io
This commit is contained in:
@@ -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});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user