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/093_async9.zig 2026-04-03 13:44:50.526780809 +0200
|
||||
+++ answers/093_async9.zig 2026-04-03 13:44:54.957870294 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
// Launch with a guaranteed separate thread.
|
||||
// Which Io method guarantees true concurrency?
|
||||
--- exercises/093_async9.zig 2026-04-06 19:26:11.388025362 +0200
|
||||
+++ answers/093_async9.zig 2026-04-06 19:18:36.242931688 +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);
|
||||
|
||||
print("Main thread continues...\n", .{});
|
||||
|
||||
// Note: All breaks in this excercise (using sleep)
|
||||
|
||||
Reference in New Issue
Block a user