diff options
author | akhropov <akhropov@yandex-team.com> | 2025-04-06 21:00:34 +0300 |
---|---|---|
committer | akhropov <akhropov@yandex-team.com> | 2025-04-06 21:13:01 +0300 |
commit | f7d173e358dad9bac25d8d2353569ba66e5ad500 (patch) | |
tree | 24797eb9f5656a1da1979c7572f08f80fca45f64 /library/cpp | |
parent | 4638675a7847697481d1c1af97b6c3992c29d2af (diff) | |
download | ydb-f7d173e358dad9bac25d8d2353569ba66e5ad500.tar.gz |
More detailed description of GetWorkerThreadId. Remove comments duplication
commit_hash:19ac2b49b9bb7ac988b229e4d5c4c4ed6f75b138
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/threading/local_executor/local_executor.h | 7 | ||||
-rw-r--r-- | library/cpp/threading/local_executor/tbb_local_executor.h | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/library/cpp/threading/local_executor/local_executor.h b/library/cpp/threading/local_executor/local_executor.h index c1c824f67cb..4eb67b034ef 100644 --- a/library/cpp/threading/local_executor/local_executor.h +++ b/library/cpp/threading/local_executor/local_executor.h @@ -54,8 +54,12 @@ namespace NPar { // @param flags Same as for `Exec`. virtual void ExecRange(TIntrusivePtr<ILocallyExecutable> exec, int firstId, int lastId, int flags) = 0; - // 0-based ILocalExecutor worker thread identification + // returns: + // 0 for for a thread outside the internal pool + // (because ILocalExecutor is allowed to use a calling thread to execute tasks as well), + // 1 ... GetThreadCount() for a thread inside the internal pool virtual int GetWorkerThreadId() const noexcept = 0; + virtual int GetThreadCount() const noexcept = 0; // Describes a range of tasks with parameters from integer range [FirstId, LastId). @@ -237,7 +241,6 @@ namespace NPar { int GetLPQueueSize() const noexcept; void ClearLPQueue(); - // 0-based TLocalExecutor worker thread identification int GetWorkerThreadId() const noexcept override; int GetThreadCount() const noexcept override; diff --git a/library/cpp/threading/local_executor/tbb_local_executor.h b/library/cpp/threading/local_executor/tbb_local_executor.h index 8d790db18c8..751a37e2d47 100644 --- a/library/cpp/threading/local_executor/tbb_local_executor.h +++ b/library/cpp/threading/local_executor/tbb_local_executor.h @@ -19,7 +19,6 @@ namespace NPar { , NumberOfTbbThreads(nThreads) {} ~TTbbLocalExecutor() noexcept override {} - // 0-based ILocalExecutor worker thread identification virtual int GetWorkerThreadId() const noexcept override; virtual int GetThreadCount() const noexcept override; |