aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ThreadPool.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ThreadPool.zig b/src/ThreadPool.zig
index 71c72fb8da..cf9c02fa59 100644
--- a/src/ThreadPool.zig
+++ b/src/ThreadPool.zig
@@ -105,12 +105,12 @@ fn runWorker(self: *ThreadPool) void {
if (self.is_running) {
var idle_node = IdleQueue.Node{ .data = std.ResetEvent.init() };
- defer idle_node.data.deinit();
self.idle_queue.prepend(&idle_node);
held.release();
idle_node.data.wait();
+ idle_node.data.deinit();
continue;
}