diff options
| author | kprotty <kbutcher6200@gmail.com> | 2021-06-19 21:31:43 -0500 |
|---|---|---|
| committer | kprotty <kbutcher6200@gmail.com> | 2021-06-30 21:48:59 -0500 |
| commit | 0a1def7833882249563358f262e2210beb77492a (patch) | |
| tree | 5441edaf05de9ff0d0d2b33f130adbddffdb9fcd /src | |
| parent | e16d3d162a85a822e16ae181ecc6ddc507278126 (diff) | |
| download | zig-0a1def7833882249563358f262e2210beb77492a.tar.gz zig-0a1def7833882249563358f262e2210beb77492a.zip | |
changes to accomodate std.Thread update
Diffstat (limited to 'src')
| -rw-r--r-- | src/ThreadPool.zig | 4 |
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(); } } |
