aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/threading/local_executor/local_executor.h
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2025-04-07 08:39:07 +0000
committerAlexander Smirnov <alex@ydb.tech>2025-04-07 08:39:07 +0000
commit288a443b15bc64c9676fb70884e73e6aba03e108 (patch)
tree9e6a6f10fffb8273222d14c68c0d0a79f1faf394 /library/cpp/threading/local_executor/local_executor.h
parentc3301110258be632f5b73a6e348d5f9d98f3eacc (diff)
parentcbea66c165a9c9d142053892cac24550a030656c (diff)
downloadydb-288a443b15bc64c9676fb70884e73e6aba03e108.tar.gz
Merge pull request #16825 from ydb-platform/merge-libs-250407-0050
Diffstat (limited to 'library/cpp/threading/local_executor/local_executor.h')
-rw-r--r--library/cpp/threading/local_executor/local_executor.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/library/cpp/threading/local_executor/local_executor.h b/library/cpp/threading/local_executor/local_executor.h
index c1c824f67c..4eb67b034e 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;