aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread/StaticResetEvent.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-02-28 20:42:34 -0800
committerGitHub <noreply@github.com>2021-02-28 20:42:34 -0800
commit9550db33cbb7dadd555842ef6d7214660e2b00d6 (patch)
treeffcf41a01dc8a55f06f5a630ed174550be33dad3 /lib/std/Thread/StaticResetEvent.zig
parenta5a3ad4f956bae1ca0e5a49de2e9ac7145170039 (diff)
parentd3d3e55fae2299d1ff594c77da2f1f41f44ab525 (diff)
downloadzig-9550db33cbb7dadd555842ef6d7214660e2b00d6.tar.gz
zig-9550db33cbb7dadd555842ef6d7214660e2b00d6.zip
Merge pull request #8097 from LemonBoy/thread-spawn-order
std: Swap arguments in Thread.spawn
Diffstat (limited to 'lib/std/Thread/StaticResetEvent.zig')
-rw-r--r--lib/std/Thread/StaticResetEvent.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/Thread/StaticResetEvent.zig b/lib/std/Thread/StaticResetEvent.zig
index 6d90d7cf9a..07a8e50c16 100644
--- a/lib/std/Thread/StaticResetEvent.zig
+++ b/lib/std/Thread/StaticResetEvent.zig
@@ -379,7 +379,7 @@ test "basic usage" {
};
var context = Context{};
- const receiver = try std.Thread.spawn(&context, Context.receiver);
+ const receiver = try std.Thread.spawn(Context.receiver, &context);
defer receiver.wait();
context.sender();
@@ -388,7 +388,7 @@ test "basic usage" {
// https://github.com/ziglang/zig/issues/7009
var timed = Context.init();
defer timed.deinit();
- const sleeper = try std.Thread.spawn(&timed, Context.sleeper);
+ const sleeper = try std.Thread.spawn(Context.sleeper, &timed);
defer sleeper.wait();
try timed.timedWaiter();
}