diff options
author | asorotsky <asorotsky@yandex-team.ru> | 2022-02-10 16:47:33 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:33 +0300 |
commit | 80f0a6b4102e3b2c89f23935c7690409033ea24c (patch) | |
tree | d37ae19cf2360516f71e010c02f3fd8fc6b22999 /library/cpp/actors/util | |
parent | 9f1d4466bb653173233b0e47d2cbda7f46995f92 (diff) | |
download | ydb-80f0a6b4102e3b2c89f23935c7690409033ea24c.tar.gz |
Restoring authorship annotation for <asorotsky@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/actors/util')
-rw-r--r-- | library/cpp/actors/util/thread.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/actors/util/thread.h b/library/cpp/actors/util/thread.h index d742c8c585..c3b0c62356 100644 --- a/library/cpp/actors/util/thread.h +++ b/library/cpp/actors/util/thread.h @@ -1,26 +1,26 @@ -#pragma once - -#include <util/generic/strbuf.h> -#include <util/stream/str.h> -#include <util/system/execpath.h> -#include <util/system/thread.h> -#include <util/system/thread.h> +#pragma once + +#include <util/generic/strbuf.h> +#include <util/stream/str.h> +#include <util/system/execpath.h> +#include <util/system/thread.h> +#include <util/system/thread.h> #include <time.h> - + inline void SetCurrentThreadName(const TString& name, const ui32 maxCharsFromProcessName = 8) { -#if defined(_linux_) +#if defined(_linux_) // linux limits threadname by 15 + \0 TStringBuf procName(GetExecPath()); procName = procName.RNextTok('/'); procName = procName.SubStr(0, maxCharsFromProcessName); - TStringStream linuxName; + TStringStream linuxName; linuxName << procName << "." << name; TThread::SetCurrentThreadName(linuxName.Str().data()); -#else +#else Y_UNUSED(maxCharsFromProcessName); TThread::SetCurrentThreadName(name.data()); -#endif -} +#endif +} |