diff options
| author | levlam <levlam@telegram.org> | 2022-11-09 18:11:48 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2022-11-09 18:11:48 +0300 |
| commit | 71e3011afab47dd132f3604a7d5a9f776b16f228 (patch) | |
| tree | 026d79b88291b2296af35c1b6820cf0949cf4a30 /tdactor/td/actor/ConcurrentScheduler.cpp | |
| parent | 8b4bc808607072b0ccd9ec371e244abd96e0efc5 (diff) | |
Implement get_scheduler_thread_id without threads.
Diffstat (limited to 'tdactor/td/actor/ConcurrentScheduler.cpp')
| -rw-r--r-- | tdactor/td/actor/ConcurrentScheduler.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tdactor/td/actor/ConcurrentScheduler.cpp b/tdactor/td/actor/ConcurrentScheduler.cpp index ef8b802d3..9a3cf2133 100644 --- a/tdactor/td/actor/ConcurrentScheduler.cpp +++ b/tdactor/td/actor/ConcurrentScheduler.cpp @@ -70,11 +70,13 @@ void ConcurrentScheduler::test_one_thread_run() { } while (!is_finished_.load(std::memory_order_relaxed)); } +#if !TD_THREAD_UNSUPPORTED thread::id ConcurrentScheduler::get_scheduler_thread_id(int32 sched_id) { auto thread_pos = static_cast<size_t>(sched_id - 1); CHECK(thread_pos < threads_.size()); return threads_[thread_pos].get_id(); } +#endif void ConcurrentScheduler::start() { CHECK(state_ == State::Start); |
