From 2fd354bd25abffb2eba7d39ddc1a589a5b496dae Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Mon, 27 Nov 2023 15:41:43 +0500 Subject: [PATCH] jobqueue prepend alloc fix --- src/util.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }