Rename the server thread to make it easier to distinguish in a profiler or debugger.

I would also rename the main thread, but that doesn't seem to be possible.
This commit is contained in:
IntegratedQuantum 2025-05-13 19:54:48 +02:00
parent 3db8c22b5d
commit ab4beca0f4

View File

@ -50,6 +50,9 @@ pub fn openWorld(name: []const u8) void {
std.log.err("Encountered error while starting server thread: {s}", .{@errorName(err)});
return;
};
main.server.thread.?.setName("Server") catch |err| {
std.log.err("Failed to rename Server thread: {s}", .{@errorName(err)});
};
while(!main.server.running.load(.acquire)) {
std.time.sleep(1_000_000);