From 84aa652846b76014afa6f1c474b36a333439b3a8 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sat, 30 Apr 2022 10:16:53 -0700 Subject: [PATCH] Set shorter thread names (#379) --- ixwebsocket/IXSocketServer.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ixwebsocket/IXSocketServer.cpp b/ixwebsocket/IXSocketServer.cpp index ed04bb0c..5d7512ba 100644 --- a/ixwebsocket/IXSocketServer.cpp +++ b/ixwebsocket/IXSocketServer.cpp @@ -268,7 +268,10 @@ namespace ix // Set the socket to non blocking mode, so that accept calls are not blocking SocketConnect::configure(_serverFd); - setThreadName("SocketServer::accept"); + // Use a cryptic name to stay within the 16 bytes limit thread name limitation + // $ echo Srv:gc:64000 | wc -c + // 13 + setThreadName("Srv:ac:" + std::to_string(_port)); for (;;) { @@ -425,7 +428,10 @@ namespace ix void SocketServer::runGC() { - setThreadName("SocketServer::GC"); + // Use a cryptic name to stay within the 16 bytes limit thread name limitation + // $ echo Srv:gc:64000 | wc -c + // 13 + setThreadName("Srv:gc:" + std::to_string(_port)); for (;;) {