fix: Update spawn's' runFn signature

This commit is contained in:
mochalins 2024-07-09 10:48:16 +09:00 committed by Jacob Young
parent b3b923e51f
commit 6446596ba1

View File

@ -223,7 +223,7 @@ pub fn spawn(pool: *Pool, comptime func: anytype, args: anytype) !void {
pool: *Pool,
run_node: RunQueue.Node = .{ .data = .{ .runFn = runFn } },
fn runFn(runnable: *Runnable) void {
fn runFn(runnable: *Runnable, _: ?usize) void {
const run_node: *RunQueue.Node = @fieldParentPtr("data", runnable);
const closure: *@This() = @alignCast(@fieldParentPtr("run_node", run_node));
@call(.auto, func, closure.arguments);