Skip to content

Commit

Permalink
Patch for Linux to support the max thread name length of 15.
Browse files Browse the repository at this point in the history
  • Loading branch information
Makosai committed Aug 26, 2024
1 parent 2c58702 commit da154ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Transport/BaseServer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub fn start(self: *BaseServer, allocator: std.mem.Allocator) !void {
// have been called before!
{
self.tcp_listener.thread = try std.Thread.spawn(.{}, onTcpConnectCallback, .{ self, allocator });
try self.tcp_listener.thread.?.setName("TcpListener Accept");
try self.tcp_listener.thread.?.setName("TcpListener");
self.tcp_listener.thread.?.detach();
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub fn main() !void {
defer is_running = false;

var logic_thread = try std.Thread.spawn(.{}, updateMain, .{allocator});
logic_thread.setName("Logic Thread") catch |err| {
logic_thread.setName("Logic") catch |err| {
print("Error setting thread name: {}\n", .{err});
};
logic_thread.detach();
Expand Down

0 comments on commit da154ef

Please sign in to comment.