update usages of @call

This commit is contained in:
Veikka Tuominen
2022-12-12 15:32:37 +02:00
parent 7b2a936173
commit 08b2d491bc
21 changed files with 103 additions and 109 deletions

View File

@@ -71,7 +71,7 @@ fn join(pool: *ThreadPool, spawned: usize) void {
pub fn spawn(pool: *ThreadPool, comptime func: anytype, args: anytype) !void {
if (builtin.single_threaded) {
@call(.{}, func, args);
@call(.auto, func, args);
return;
}
@@ -84,7 +84,7 @@ pub fn spawn(pool: *ThreadPool, comptime func: anytype, args: anytype) !void {
fn runFn(runnable: *Runnable) void {
const run_node = @fieldParentPtr(RunQueue.Node, "data", runnable);
const closure = @fieldParentPtr(@This(), "run_node", run_node);
@call(.{}, func, closure.arguments);
@call(.auto, func, closure.arguments);
// The thread pool's allocator is protected by the mutex.
const mutex = &closure.pool.mutex;