aboutsummaryrefslogtreecommitdiff
path: root/src/ThreadPool.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-12-18 21:50:44 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-12-20 15:08:59 -0700
commitb2f8631a3c9b2cc04a4c78f38d164130be2fb1ae (patch)
treefa378fd8ba41bcefbf7a7f5fb8bb42e3b8b27a34 /src/ThreadPool.zig
parent32fd637e57c3b4391b3f2f4499c803e3d4e8f615 (diff)
downloadzig-b2f8631a3c9b2cc04a4c78f38d164130be2fb1ae.tar.gz
zig-b2f8631a3c9b2cc04a4c78f38d164130be2fb1ae.zip
ThreadPool: delete dead code
If this errdefer did get run it would constitute a race condition. So I deleted the dead code for clarity.
Diffstat (limited to 'src/ThreadPool.zig')
-rw-r--r--src/ThreadPool.zig1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/ThreadPool.zig b/src/ThreadPool.zig
index a5f59a30e7..6a59b684be 100644
--- a/src/ThreadPool.zig
+++ b/src/ThreadPool.zig
@@ -77,7 +77,6 @@ pub fn spawn(self: *ThreadPool, comptime func: anytype, args: anytype) !void {
};
const closure = try self.allocator.create(Closure);
- errdefer self.allocator.destroy(closure);
closure.* = .{
.arguments = args,
.pool = self,