diff options
author | eeight <eeight@yandex-team.ru> | 2022-02-10 16:46:18 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:18 +0300 |
commit | 475c0a46f28166e83fd263badc7546377cddcabe (patch) | |
tree | 39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /library/cpp/threading/poor_man_openmp | |
parent | a6e0145a095c7bb3770d6e07aee301de5c73f96e (diff) | |
download | ydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz |
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/threading/poor_man_openmp')
-rw-r--r-- | library/cpp/threading/poor_man_openmp/thread_helper.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/threading/poor_man_openmp/thread_helper.h b/library/cpp/threading/poor_man_openmp/thread_helper.h index 0ecee0590b5..d1744f217d9 100644 --- a/library/cpp/threading/poor_man_openmp/thread_helper.h +++ b/library/cpp/threading/poor_man_openmp/thread_helper.h @@ -1,6 +1,6 @@ #pragma once -#include <util/thread/pool.h> +#include <util/thread/pool.h> #include <util/generic/utility.h> #include <util/generic/yexception.h> #include <util/system/info.h> @@ -17,7 +17,7 @@ public: TMtpQueueHelper() { SetThreadCount(NSystemInfo::CachedNumberOfCpus()); } - IThreadPool* Get() { + IThreadPool* Get() { return q.Get(); } size_t GetThreadCount() { @@ -25,14 +25,14 @@ public: } void SetThreadCount(size_t threads) { ThreadCount = threads; - q = CreateThreadPool(ThreadCount); + q = CreateThreadPool(ThreadCount); } static TMtpQueueHelper& Instance(); private: size_t ThreadCount; - TAutoPtr<IThreadPool> q; + TAutoPtr<IThreadPool> q; }; namespace NYmp { @@ -49,7 +49,7 @@ namespace NYmp { chunkSize = Max<size_t>(chunkSize, 1); size_t threadCount = TMtpQueueHelper::Instance().GetThreadCount(); - IThreadPool* queue = TMtpQueueHelper::Instance().Get(); + IThreadPool* queue = TMtpQueueHelper::Instance().Get(); TCondVar cv; TMutex mutex; TAtomic counter = threadCount; |