diff --git a/src/util.zig b/src/util.zig index b9c29f5..8f82552 100644 --- a/src/util.zig +++ b/src/util.zig @@ -33,10 +33,10 @@ pub const JobQueue = struct { }; } - pub fn prepend(self: *Self, job: Job) void { + pub fn prepend(self: *Self, job: Job) !void { self.mutex.lock(); defer self.mutex.unlock(); - var n = try self.job_pool.create(Node); + var n = try self.job_pool.create(); n.data = job; return self.queue.prepend(n); }