···9797 // there's no more data coming.
9898 queue.close(io);
9999100100- // Wait for the collector to drain the remaining queue.
101101- _ = collector_future.await(io);
102102- // _ = collector_future.???(io);
100100+ // Bug 4: How do we wait for the collector to drain the remaining queue?
101101+ _ = collector_future.???(io);
103102104103 // Now write the garden report. This is critical — it must
105104 // NOT be interrupted, even if something tries to cancel us!
+8-8
patches/patches/095_quiz_async.patch
···11---- exercises/095_quiz_async.zig 2026-04-06 19:55:17.111817364 +0200
22-+++ answers/095_quiz_async.zig 2026-04-06 19:56:16.063974543 +0200
11+--- exercises/095_quiz_async.zig 2026-04-13 19:11:04.173440326 -0700
22++++ answers/095_quiz_async.zig 2026-04-13 19:10:31.618592222 -0700
33@@ -51,7 +51,7 @@
44 fn addReading(self: *GardenWeather, io: std.Io, reading: Reading) void {
55 // Bug 1: The collector needs to lock before modifying
···1818 defer _ = collector_future.cancel(io);
19192020 // Sensor group: the sensors can use async — they just need
2121-@@ -91,7 +91,7 @@
2121+@@ -91,22 +91,22 @@
22222323 // Bug 3: Wait for ALL sensors to finish sending their readings.
2424 // What Group method blocks until all tasks complete?
···27272828 // All sensors done — close the queue so the collector knows
2929 // there's no more data coming.
3030-@@ -99,15 +99,14 @@
3030+ queue.close(io);
31313232- // Wait for the collector to drain the remaining queue.
3333- _ = collector_future.await(io);
3434-- // _ = collector_future.???(io);
3232+ // Bug 4: How do we wait for the collector to drain the remaining queue?
3333+- _ = collector_future.???(io);
3434++ _ = collector_future.await(io);
35353636 // Now write the garden report. This is critical — it must
3737 // NOT be interrupted, even if something tries to cancel us!
···45454646 printGardenReport(&weather);
4747 }
4848-@@ -129,7 +128,7 @@
4848+@@ -128,7 +128,7 @@
49495050 // Bug 6: Send the reading into the queue.
5151 // What Queue method sends a single element?