aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread/StaticResetEvent.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-07-04 22:31:02 -0400
committerGitHub <noreply@github.com>2021-07-04 22:31:02 -0400
commitb7da1b2d45bc42a56eea3a143e4237a0712c4769 (patch)
tree5474938657d5dfd9273562c160ad5f1e3a02b824 /lib/std/Thread/StaticResetEvent.zig
parent5d0dad9acdac854d68e1447b90fd3dbde9ff0b2d (diff)
parentc8f90a7e7e10be62634454bf124bef3c6130a0db (diff)
downloadzig-b7da1b2d45bc42a56eea3a143e4237a0712c4769.tar.gz
zig-b7da1b2d45bc42a56eea3a143e4237a0712c4769.zip
Merge pull request #9175 from kprotty/thread
std.Thread enhancements
Diffstat (limited to 'lib/std/Thread/StaticResetEvent.zig')
-rw-r--r--lib/std/Thread/StaticResetEvent.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/Thread/StaticResetEvent.zig b/lib/std/Thread/StaticResetEvent.zig
index 6f869e0d89..40974938d0 100644
--- a/lib/std/Thread/StaticResetEvent.zig
+++ b/lib/std/Thread/StaticResetEvent.zig
@@ -384,8 +384,8 @@ test "basic usage" {
};
var context = Context{};
- const receiver = try std.Thread.spawn(Context.receiver, &context);
- defer receiver.wait();
+ const receiver = try std.Thread.spawn(.{}, Context.receiver, .{&context});
+ defer receiver.join();
try context.sender();
if (false) {
@@ -393,8 +393,8 @@ test "basic usage" {
// https://github.com/ziglang/zig/issues/7009
var timed = Context.init();
defer timed.deinit();
- const sleeper = try std.Thread.spawn(Context.sleeper, &timed);
- defer sleeper.wait();
+ const sleeper = try std.Thread.spawn(.{}, Context.sleeper, .{&timed});
+ defer sleeper.join();
try timed.timedWaiter();
}
}