We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 844da16 commit db96ad4Copy full SHA for db96ad4
lib/std/Thread/Pool.zig
@@ -89,7 +89,7 @@ pub fn spawn(pool: *Pool, comptime func: anytype, args: anytype) !void {
89
90
fn runFn(runnable: *Runnable) void {
91
const run_node: *RunQueue.Node = @fieldParentPtr("data", runnable);
92
- const closure: *@This() = @fieldParentPtr("run_node", run_node);
+ const closure: *@This() = @alignCast(@fieldParentPtr("run_node", run_node));
93
@call(.auto, func, closure.arguments);
94
95
// The thread pool's allocator is protected by the mutex.
0 commit comments