hpx/schedulers/static_priority_queue_scheduler.hpp

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

namespace hpx
namespace threads
namespace policies

Typedefs

using default_static_priority_queue_scheduler_terminated_queue = lockfree_fifo
template<typename Mutex = std::mutex, typename PendingQueuing = lockfree_fifo, typename StagedQueuing = lockfree_fifo, typename TerminatedQueuing = default_static_priority_queue_scheduler_terminated_queue>
class static_priority_queue_scheduler : public hpx::threads::policies::local_priority_queue_scheduler<std::mutex, lockfree_fifo, lockfree_fifo, default_static_priority_queue_scheduler_terminated_queue>
#include <static_priority_queue_scheduler.hpp>

The static_priority_queue_scheduler maintains exactly one queue of work items (threads) per OS thread, where this OS thread pulls its next work from. Additionally it maintains separate queues: several for high priority threads and one for low priority threads. High priority threads are executed by the first N OS threads before any other work is executed. Low priority threads are executed by the last OS thread whenever no other work is available. This scheduler does not do any work stealing.

Public Types

template<>
using base_type = local_priority_queue_scheduler<Mutex, PendingQueuing, StagedQueuing, TerminatedQueuing>
template<>
using init_parameter_type = typename base_type::init_parameter_type

Public Functions

static_priority_queue_scheduler(init_parameter_type const &init, bool deferred_initialization = true)
void set_scheduler_mode(scheduler_mode mode)

Public Static Functions

static std::string get_scheduler_name()