MCPcopy Create free account
hub / github.com/NVIDIA/stdexec / run

Method run

include/exec/static_thread_pool.hpp:804–819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 9

expect_emptyFunction · 0.45
expect_emptyFunction · 0.45
threadMethod · 0.45
operator()Method · 0.45
single_thread_contextMethod · 0.45

Calls 4

popMethod · 0.80
execute_Method · 0.80
bind_to_nodeMethod · 0.45
numa_nodeMethod · 0.45

Tested by 3

expect_emptyFunction · 0.36
expect_emptyFunction · 0.36
threadMethod · 0.36