class static_queue_scheduler
Declaration
template <
typename Mutex = std::mutex,
typename PendingQueuing = pika::threads::policies::lockfree_fifo,
typename StagedQueuing = pika::threads::policies::lockfree_fifo,
typename TerminatedQueuing = pika::threads::policies::
default_static_queue_scheduler_terminated_queue>
class static_queue_scheduler { /* full declaration omitted */ };Description
//////////////////////////////////////////////////////////////////////// The local_queue_scheduler maintains exactly one queue of work items (threads) per OS thread, where this OS thread pulls its next work from.
Declared at: libs/pika/schedulers/include/pika/schedulers/static_queue_scheduler.hpp:50
Method Overview
- public bool get_next_thread(std::size_t num_thread, bool, threads::thread_id_ref_type & thrd, bool)
- public static std::string get_scheduler_name()
- public void set_scheduler_mode(pika::threads::policies::scheduler_mode mode)
- public static_queue_scheduler<Mutex, PendingQueuing, StagedQueuing, TerminatedQueuing>(const typename base_type::init_parameter_type & init, bool deferred_initialization = true)
- public bool wait_or_add_new(std::size_t num_thread, bool running, std::int64_t & idle_loop_count, bool, std::size_t & added)
Methods
bool get_next_thread(
std::size_t num_thread,
bool,
threads::thread_id_ref_type& thrd,
bool)
bool get_next_thread(
std::size_t num_thread,
bool,
threads::thread_id_ref_type& thrd,
bool)Description
Return the next thread to be executed, return false if none is available
Declared at: libs/pika/schedulers/include/pika/schedulers/static_queue_scheduler.hpp:80
Parameters
- std::size_t num_thread
- bool
- threads::thread_id_ref_type& thrd
- bool
static std::string get_scheduler_name()
static std::string get_scheduler_name()Declared at: libs/pika/schedulers/include/pika/schedulers/static_queue_scheduler.hpp:65
void set_scheduler_mode(
pika::threads::policies::scheduler_mode mode)
void set_scheduler_mode(
pika::threads::policies::scheduler_mode mode)Declared at: libs/pika/schedulers/include/pika/schedulers/static_queue_scheduler.hpp:70
Parameters
- pika::threads::policies::scheduler_mode mode
static_queue_scheduler<Mutex,
PendingQueuing,
StagedQueuing,
TerminatedQueuing>(
const typename base_type::init_parameter_type&
init,
bool deferred_initialization = true)
static_queue_scheduler<Mutex,
PendingQueuing,
StagedQueuing,
TerminatedQueuing>(
const typename base_type::init_parameter_type&
init,
bool deferred_initialization = true)Declared at: libs/pika/schedulers/include/pika/schedulers/static_queue_scheduler.hpp:58
Parameters
- const typename base_type::init_parameter_type& init
- bool deferred_initialization = true
bool wait_or_add_new(
std::size_t num_thread,
bool running,
std::int64_t& idle_loop_count,
bool,
std::size_t& added)
bool wait_or_add_new(
std::size_t num_thread,
bool running,
std::int64_t& idle_loop_count,
bool,
std::size_t& added)Description
This is a function which gets called periodically by the thread manager to allow for maintenance tasks to be executed in the scheduler. Returns true if the OS thread calling this function has to be terminated (i.e. no more work has to be done).
Declared at: libs/pika/schedulers/include/pika/schedulers/static_queue_scheduler.hpp:105
Parameters
- std::size_t num_thread
- bool running
- std::int64_t& idle_loop_count
- bool
- std::size_t& added