aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/actor/thread_extra.cpp
diff options
context:
space:
mode:
authornga <nga@yandex-team.ru>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:09 +0300
commitc2a1af049e9deca890e9923abe64fe6c59060348 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/messagebus/actor/thread_extra.cpp
parent1f553f46fb4f3c5eec631352cdd900a0709016af (diff)
downloadydb-c2a1af049e9deca890e9923abe64fe6c59060348.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/actor/thread_extra.cpp')
-rw-r--r--library/cpp/messagebus/actor/thread_extra.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/messagebus/actor/thread_extra.cpp b/library/cpp/messagebus/actor/thread_extra.cpp
index 6472dd92f4..048480f255 100644
--- a/library/cpp/messagebus/actor/thread_extra.cpp
+++ b/library/cpp/messagebus/actor/thread_extra.cpp
@@ -2,29 +2,29 @@
#include <util/stream/str.h>
#include <util/system/execpath.h>
-#include <util/system/platform.h>
-#include <util/system/thread.h>
-
-namespace {
+#include <util/system/platform.h>
+#include <util/system/thread.h>
+
+namespace {
#ifdef _linux_
TString GetExecName() {
TString execPath = GetExecPath();
- size_t lastSlash = execPath.find_last_of('/');
+ size_t lastSlash = execPath.find_last_of('/');
if (lastSlash == TString::npos) {
- return execPath;
- } else {
- return execPath.substr(lastSlash + 1);
- }
- }
+ return execPath;
+ } else {
+ return execPath.substr(lastSlash + 1);
+ }
+ }
#endif
-}
-
+}
+
void SetCurrentThreadName(const char* name) {
-#ifdef _linux_
- TStringStream linuxName;
- linuxName << GetExecName() << "." << name;
+#ifdef _linux_
+ TStringStream linuxName;
+ linuxName << GetExecName() << "." << name;
TThread::SetCurrentThreadName(linuxName.Str().data());
-#else
+#else
TThread::SetCurrentThreadName(name);
-#endif
-}
+#endif
+}