jobqueue prepend alloc fix
This commit is contained in:
parent
3e20d948f8
commit
2fd354bd25
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
self.mutex.lock();
|
||||||
defer self.mutex.unlock();
|
defer self.mutex.unlock();
|
||||||
var n = try self.job_pool.create(Node);
|
var n = try self.job_pool.create();
|
||||||
n.data = job;
|
n.data = job;
|
||||||
return self.queue.prepend(n);
|
return self.queue.prepend(n);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue