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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user