Skip to content

Commit

Permalink
minilib: TimerQueue, fix data race
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudef committed Jul 4, 2024
1 parent 2a8ec3d commit 5a4ab93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/minilib/TimerQueue.zig
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,10 @@ const LinuxTimerQueue = struct {
@setCold(true);
if (self.thread) |_| unreachable;
self.thread = try std.Thread.spawn(.{ .allocator = self.allocator }, threadMain, .{self});
self.thread.?.setName("TimerQueue Thread") catch {};
}

fn threadMain(self: *@This()) void {
self.thread.?.setName("TimerQueue Thread") catch {};
outer: while (true) {
var events: [32]std.os.linux.epoll_event = undefined;
const n = std.posix.epoll_wait(self.epoll, &events, -1);
Expand Down

0 comments on commit 5a4ab93

Please sign in to comment.