summaryrefslogtreecommitdiff
path: root/exercises
diff options
context:
space:
mode:
Diffstat (limited to 'exercises')
-rw-r--r--exercises/093_async9.zig4
-rw-r--r--exercises/095_quiz_async.zig5
2 files changed, 4 insertions, 5 deletions
diff --git a/exercises/093_async9.zig b/exercises/093_async9.zig
index f3c26c9..d4edd7b 100644
--- a/exercises/093_async9.zig
+++ b/exercises/093_async9.zig
@@ -63,10 +63,10 @@ pub fn main(init: std.process.Init) !void {
// Launch two workers, each searching half the array.
// Remember, we want them to be guaranteed separate units of concurrency.
- var f1 = ???(searchRange, .{ data[0..mid], target, 0, 0, &queue, io });
+ var f1 = ???(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 = ???(searchThreshold, .{ io, data[mid..], threshold, mid, 1, &queue });
defer _ = f2.cancel(io);
// Wait for the first result.
diff --git a/exercises/095_quiz_async.zig b/exercises/095_quiz_async.zig
index b116fc9..7c06168 100644
--- a/exercises/095_quiz_async.zig
+++ b/exercises/095_quiz_async.zig
@@ -97,9 +97,8 @@ pub fn main(init: std.process.Init) !void {
// there's no more data coming.
queue.close(io);
- // Wait for the collector to drain the remaining queue.
- _ = collector_future.await(io);
- // _ = collector_future.???(io);
+ // Bug 4: How do we wait for the collector to drain the remaining queue?
+ _ = collector_future.???(io);
// Now write the garden report. This is critical — it must
// NOT be interrupted, even if something tries to cancel us!