| 802 | } |
| 803 | |
| 804 | inline void _static_thread_pool::run(std::uint32_t thread_index) noexcept |
| 805 | { |
| 806 | STDEXEC_ASSERT(thread_index < thread_count_); |
| 807 | // NOLINTNEXTLINE(bugprone-unused-return-value) |
| 808 | numa_.bind_to_node(thread_states_[thread_index]->numa_node()); |
| 809 | while (true) |
| 810 | { |
| 811 | // Make a blocking call to de-queue a task if we don't already have one. |
| 812 | auto [task, queue_index] = thread_states_[thread_index]->pop(); |
| 813 | if (!task) |
| 814 | { |
| 815 | return; // pop() only returns null when request_stop() was called. |
| 816 | } |
| 817 | task->execute_(task, queue_index); |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | inline void _static_thread_pool::join() noexcept |
| 822 | { |