aboutsummaryrefslogtreecommitdiff
path: root/src/ThreadPool.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ThreadPool.zig')
-rw-r--r--src/ThreadPool.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ThreadPool.zig b/src/ThreadPool.zig
index 4a7fa8cb9b..230608df4b 100644
--- a/src/ThreadPool.zig
+++ b/src/ThreadPool.zig
@@ -74,13 +74,13 @@ 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.run, worker);
+ worker.thread = try std.Thread.spawn(.{}, Worker.run, .{worker});
}
}
fn destroyWorkers(self: *ThreadPool, spawned: usize) void {
for (self.workers[0..spawned]) |*worker| {
- worker.thread.wait();
+ worker.thread.join();
worker.idle_node.data.deinit();
}
}