mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
fix: Update spawn's' runFn signature
This commit is contained in:
parent
b3b923e51f
commit
6446596ba1
@ -223,7 +223,7 @@ pub fn spawn(pool: *Pool, comptime func: anytype, args: anytype) !void {
|
|||||||
pool: *Pool,
|
pool: *Pool,
|
||||||
run_node: RunQueue.Node = .{ .data = .{ .runFn = runFn } },
|
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 run_node: *RunQueue.Node = @fieldParentPtr("data", runnable);
|
||||||
const closure: *@This() = @alignCast(@fieldParentPtr("run_node", run_node));
|
const closure: *@This() = @alignCast(@fieldParentPtr("run_node", run_node));
|
||||||
@call(.auto, func, closure.arguments);
|
@call(.auto, func, closure.arguments);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user