Commit 6446596ba1

mochalins <117967760+mochalins@users.noreply.github.com>
2024-07-09 03:48:16
fix: Update `spawn`'s' `runFn` signature
1 parent b3b923e
Changed files (1)
lib
std
Thread
lib/std/Thread/Pool.zig
@@ -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);