util: zero-pad thread number suffixes

Thread names with numeric suffixes are easier to scan when the suffixes use a fixed width.
Format `ThreadPool` and script-check worker suffixes as two digits while keeping the compact dotted convention.

Co-authored-by: Hodlinator <172445034+hodlinator@users.noreply.github.com>
This commit is contained in:
Lőrinc
2026-05-20 14:56:08 +03:00
parent 41e531c4ab
commit d69c46292d
3 changed files with 4 additions and 4 deletions

View File

@@ -149,7 +149,7 @@ public:
m_worker_threads.reserve(worker_threads_num);
for (int n = 0; n < worker_threads_num; ++n) {
m_worker_threads.emplace_back([this, n]() {
util::ThreadRename(strprintf("scriptch.%i", n));
util::ThreadRename(strprintf("scriptch.%02i", n));
Loop(false /* worker thread */);
});
}