aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread/Mutex.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/Thread/Mutex.zig')
-rw-r--r--lib/std/Thread/Mutex.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/Thread/Mutex.zig b/lib/std/Thread/Mutex.zig
index 49f138079d..35095b2a3c 100644
--- a/lib/std/Thread/Mutex.zig
+++ b/lib/std/Thread/Mutex.zig
@@ -297,12 +297,12 @@ test "basic usage" {
try testing.expect(context.data == TestContext.incr_count);
} else {
const thread_count = 10;
- var threads: [thread_count]*std.Thread = undefined;
+ var threads: [thread_count]std.Thread = undefined;
for (threads) |*t| {
- t.* = try std.Thread.spawn(worker, &context);
+ t.* = try std.Thread.spawn(.{}, worker, .{&context});
}
for (threads) |t|
- t.wait();
+ t.join();
try testing.expect(context.data == thread_count * TestContext.incr_count);
}