diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
commit | 9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /util/system/thread.h | |
parent | 8cbc307de0221f84c80c42dcbe07d40727537e2c (diff) | |
download | ydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/thread.h')
-rw-r--r-- | util/system/thread.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/util/system/thread.h b/util/system/thread.h index 1db7af6adb..a6e8abdb5b 100644 --- a/util/system/thread.h +++ b/util/system/thread.h @@ -8,7 +8,7 @@ #include <util/generic/string.h> #include "defaults.h" -#include "progname.h" +#include "progname.h" bool SetHighestThreadPriority(); @@ -27,11 +27,11 @@ public: size_t StackSize; void* StackPointer; // See comments for `SetCurrentThreadName` - TString Name = GetProgramName(); + TString Name = GetProgramName(); inline TParams() - : Proc(nullptr) - , Data(nullptr) + : Proc(nullptr) + , Data(nullptr) , StackSize(0) , StackPointer(nullptr) { @@ -103,24 +103,24 @@ public: static TId ImpossibleThreadId() noexcept; static TId CurrentThreadId() noexcept; - + /* * Returns numeric thread id, as visible in e. g. htop. * Consider using this value for logging. */ static TId CurrentThreadNumericId() noexcept; - // NOTE: Content of `name` will be copied. - // - // NOTE: On Linux thread name is limited to 15 symbols which is probably the smallest one among + // NOTE: Content of `name` will be copied. + // + // NOTE: On Linux thread name is limited to 15 symbols which is probably the smallest one among // all platforms. If you provide a name longer than 15 symbols it will be cut. So if you expect // `CurrentThreadName` to return the same name as `name` make sure it's not longer than 15 - // symbols. + // symbols. static void SetCurrentThreadName(const char* name); // NOTE: Will return empty string where CanGetCurrentThreadName() returns false. static TString CurrentThreadName(); - + // NOTE: Depends on a platform version. // Will return true for Darwin, Linux or fresh Windows 10. static bool CanGetCurrentThreadName(); @@ -157,11 +157,11 @@ private: THolder<TImpl> Impl_; }; -class ISimpleThread: public TThread { +class ISimpleThread: public TThread { public: - ISimpleThread(size_t stackSize = 0); + ISimpleThread(size_t stackSize = 0); - virtual ~ISimpleThread() = default; + virtual ~ISimpleThread() = default; virtual void* ThreadProc() = 0; }; |