diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /util/system/thread.h | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 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 a6e8abdb5b..1db7af6adb 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; }; |