ThreadPool: delete dead code

If this errdefer did get run it would constitute a race condition. So I
deleted the dead code for clarity.
This commit is contained in:
Andrew Kelley 2020-12-18 21:50:44 -07:00
parent 32fd637e57
commit b2f8631a3c
2 changed files with 0 additions and 1 deletions

View File

@ -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,