aboutsummaryrefslogtreecommitdiff
path: root/lib/std/atomic/queue.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/atomic/queue.zig')
-rw-r--r--lib/std/atomic/queue.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/std/atomic/queue.zig b/lib/std/atomic/queue.zig
index cc5b20488b..cee431951c 100644
--- a/lib/std/atomic/queue.zig
+++ b/lib/std/atomic/queue.zig
@@ -214,20 +214,20 @@ test "std.atomic.Queue" {
} else {
try expect(context.queue.isEmpty());
- var putters: [put_thread_count]*std.Thread = undefined;
+ var putters: [put_thread_count]std.Thread = undefined;
for (putters) |*t| {
- t.* = try std.Thread.spawn(startPuts, &context);
+ t.* = try std.Thread.spawn(.{}, startPuts, .{&context});
}
- var getters: [put_thread_count]*std.Thread = undefined;
+ var getters: [put_thread_count]std.Thread = undefined;
for (getters) |*t| {
- t.* = try std.Thread.spawn(startGets, &context);
+ t.* = try std.Thread.spawn(.{}, startGets, .{&context});
}
for (putters) |t|
- t.wait();
+ t.join();
@atomicStore(bool, &context.puts_done, true, .SeqCst);
for (getters) |t|
- t.wait();
+ t.join();
try expect(context.queue.isEmpty());
}