util: Make thread names shorter

Thread names at the process level are limited by 15 characters. This
commit ensures that name 'b-httpworker.42' will not be cropped.
This commit is contained in:
Hennadii Stepanov 2019-09-29 21:49:35 +03:00
parent 6b2210f101
commit 386ae0f691
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -57,6 +57,6 @@ static void SetInternalName(std::string name) { }
void util::ThreadRename(std::string&& name)
{
SetThreadName(("bitcoin-" + name).c_str());
SetThreadName(("b-" + name).c_str());
SetInternalName(std::move(name));
}