aboutsummaryrefslogtreecommitdiff
path: root/src/ThreadPool.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 /src/ThreadPool.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 'src/ThreadPool.zig')
-rw-r--r--src/ThreadPool.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ThreadPool.zig b/src/ThreadPool.zig
index ec580210e9..e66742b49e 100644
--- a/src/ThreadPool.zig
+++ b/src/ThreadPool.zig
@@ -74,7 +74,7 @@ pub fn init(self: *ThreadPool, allocator: *std.mem.Allocator) !void {
try worker.idle_node.data.init();
errdefer worker.idle_node.data.deinit();
- worker.thread = try std.Thread.spawn(worker, Worker.run);
+ worker.thread = try std.Thread.spawn(Worker.run, worker);
}
}