/////////////////////////////////////////////////////////////////////////// // Return the number of the NUMA node the current thread is running on std::size_t get_numa_node_number() { bool numa_sensitive = false; std::size_t thread_num = threadmanager_base::get_worker_thread_num(&numa_sensitive); return get_topology().get_numa_node_number( get_thread_manager().get_pu_num(thread_num)); }
// 关闭连接 void TCPSessionHandler::close() { if (is_closed()) { return; } session_handler_stuff::PackMessageList(shared_from_this()); ThreadPointer thread_ptr = get_thread_manager()->get_thread(thread_id_); if (thread_ptr != nullptr) { thread_ptr->post(std::bind(session_handler_stuff::CloseSession, thread_ptr, session_id_)); } }
bool enumerate_threads(util::function_nonser<bool(thread_id_type)> const& f, thread_state_enum state) { return get_thread_manager().enumerate_threads(f, state); }
std::int64_t get_thread_count(thread_priority priority, thread_state_enum state) { return get_thread_manager().get_thread_count(state, priority); }
std::int64_t get_thread_count(thread_state_enum state) { return get_thread_manager().get_thread_count(state); }
/////////////////////////////////////////////////////////////////////////// // Return the number of the NUMA node the current thread is running on std::size_t get_numa_node_number() { std::size_t thread_num = hpx::get_worker_thread_num(); return get_topology().get_numa_node_number( get_thread_manager().get_pu_num(thread_num)); }
mask_cref_type executor_base::get_pu_mask(topology const& topology, std::size_t num_thread) const { return get_thread_manager().get_pu_mask(topology, num_thread); }