util: shorten `ThreadPool` worker names
What changed, and why it matters
This commit simply changes the naming format for background worker threads in Bitcoin Core from 'name_pool_N' to 'name.N'. The only practical effect is to make thread names shorter and easier to read in Linux debugging tools, because Linux limits visible thread names to 15 characters. There is no security issue here.
No security action needed. This is a benign naming-only refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies util/threadpool.h to format worker thread names as ‘%s.%d’ instead of ‘%s_pool_%d’, and updates the corresponding documentation in doc/developer-notes.md. This is a cosmetic/ergonomic change to accommodate Linux’s 16-byte TASK_COMM_LEN limit (15 visible bytes) for thread names. No functional, concurrency, or security behavior is altered.
Changed components
src/util/threadpool.hdoc/developer-notes.mdInspect captured patch +2 / −2
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index af242291..c7ec0ca4 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -705,7 +705,7 @@ and its `cs_KeyStore` lock for example).
- [ThreadHTTP (`b-http`)](https://doxygen.bitcoincore.org/httpserver_8cpp.html#http)
: Libevent thread to listen for RPC and REST connections.
-- [HTTP worker threads (`b-http_pool_x`)](https://doxygen.bitcoincore.org/httpserver_8cpp.html#http_pool)
+- [HTTP worker threads (`b-http.x`)](https://doxygen.bitcoincore.org/httpserver_8cpp.html#http_pool)
: Threads to service RPC and REST requests.
- [Indexer threads (`b-txindex`, etc)](https://doxygen.bitcoincore.org/class_base_index.html#index_sync)
diff --git a/src/util/threadpool.h b/src/util/threadpool.h
index ff0590f8..6e35df27 100644
--- a/src/util/threadpool.h
+++ b/src/util/threadpool.h
@@ -112,7 +112,7 @@ public:
// Create workers
m_workers.reserve(num_workers);
for (int i = 0; i < num_workers; i++) {
- m_workers.emplace_back(&util::TraceThread, strprintf("%s_pool_%d", m_name, i), [this] { WorkerThread(); });
+ m_workers.emplace_back(&util::TraceThread, strprintf("%s.%d", m_name, i), [this] { WorkerThread(); });
}
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.