hpx/schedulers/thread_queue_mc.hpp

See Public API for a list of names and headers that are part of the public HPX API.

Defines

THREAD_QUEUE_MC_DEBUG
namespace hpx

Functions

static hpx::debug::enable_print<THREAD_QUEUE_MC_DEBUG> hpx::tqmc_deb("_TQ_MC_")
namespace threads
namespace policies
template<typename Mutex, typename PendingQueuing, typename StagedQueuing, typename TerminatedQueuing>
class thread_queue_mc

Public Types

typedef Mutex mutex_type
template<>
using thread_queue_type = thread_queue_mc<Mutex, PendingQueuing, StagedQueuing, TerminatedQueuing>
template<>
using thread_heap_type = std::list<thread_id_type, util::internal_allocator<thread_id_type>>
template<>
using task_description = thread_init_data
template<>
using thread_description = thread_data
typedef PendingQueuing::template apply<thread_id_ref_type>::type work_items_type
typedef concurrentqueue_fifo::apply<task_description>::type task_items_type

Public Functions

std::size_t add_new(std::int64_t add_count, thread_queue_type *addfrom, bool stealing)
thread_queue_mc(const thread_queue_init_parameters &parameters, std::size_t queue_num = std::size_t(-1))
void set_holder(queue_holder_thread<thread_queue_type> *holder)
~thread_queue_mc()
std::int64_t get_queue_length() const
std::int64_t get_queue_length_pending() const
std::int64_t get_queue_length_staged(std::memory_order order = std::memory_order_relaxed) const
std::int64_t get_thread_count() const
void create_thread(thread_init_data &data, thread_id_ref_type *id, error_code &ec)
bool get_next_thread(threads::thread_id_ref_type &thrd, bool other_end, bool check_new = false)

Return the next thread to be executed, return false if none is available

void schedule_work(threads::thread_id_ref_type thrd, bool other_end)

Schedule the passed thread (put it on the ready work queue)

void on_start_thread(std::size_t)
void on_stop_thread(std::size_t)
void on_error(std::size_t, std::exception_ptr const&)

Public Members

thread_queue_init_parameters parameters_
const int queue_index_
queue_holder_thread<thread_queue_type> *holder_
task_items_type new_task_items_
work_items_type work_items_
util::cache_line_data<std::atomic<std::int32_t>> new_tasks_count_
util::cache_line_data<std::atomic<std::int32_t>> work_items_count_