Skip to content

Commit

Permalink
Remove usage of never_inline
Browse files Browse the repository at this point in the history
This appears to be no-op when the function is @setCold
  • Loading branch information
judofyr committed Aug 4, 2024
1 parent 15dcf5e commit 64faffa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/root.zig
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ pub const Task = struct {

pub inline fn tick(self: *Task) void {
if (self.worker.heartbeat.load(.monotonic)) {
@call(.never_inline, ThreadPool.heartbeat, .{ self.worker.pool, self.worker });
self.worker.pool.heartbeat(self.worker);
}
}

Expand Down Expand Up @@ -543,10 +543,7 @@ pub fn Future(comptime Input: type, Output: type) type {
self.job.pop(&task.job_tail);
return null;
},
.executing => {
// never_inline + setCold helps to keep this off the hot path.
return @call(.never_inline, joinExecuting, .{ self, task });
},
.executing => return self.joinExecuting(task),
}
}

Expand Down

0 comments on commit 64faffa

Please sign in to comment.