aboutsummaryrefslogtreecommitdiff
path: root/src/ThreadPool.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ThreadPool.zig')
-rw-r--r--src/ThreadPool.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ThreadPool.zig b/src/ThreadPool.zig
index ac95def319..36d004cfc6 100644
--- a/src/ThreadPool.zig
+++ b/src/ThreadPool.zig
@@ -12,7 +12,12 @@ idle_queue: IdleQueue = .{},
const IdleQueue = std.SinglyLinkedList(std.Thread.ResetEvent);
const RunQueue = std.SinglyLinkedList(Runnable);
const Runnable = struct {
- runFn: fn (*Runnable) void,
+ runFn: RunProto,
+};
+
+const RunProto = switch (builtin.zig_backend) {
+ .stage1 => fn (*Runnable) void,
+ else => *const fn (*Runnable) void,
};
const Worker = struct {