mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
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:
parent
32fd637e57
commit
b2f8631a3c
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user