22namespace MultiProcess {
53 JobTask job_task{job_object_id, state_id, task_id};
68 bool popped =
pop(job_task);
97 auto poll_result = poller.
poll(-1);
99 for (
auto readable_index : poll_result) {
101 if (readable_index == mq_index) {
108 auto this_worker_id = readable_index - 1;
Messenger & messenger() const
static JobManager * instance()
std::pair< Poller, std::size_t > create_queue_poller()
Helper function that creates a poller for Queue::loop()
value_t receive_from_master_on_queue()
value_t receive_from_worker_on_queue(std::size_t this_worker_id)
void send_from_queue_to_worker(std::size_t this_worker_id)
Waits for input on a set of registered Channels.
std::vector< std::size_t > poll(int timeout_ms=-1) const
Wait for input; returns the registration indices of readable channels.
static bool sigterm_received()
virtual bool pop(JobTask &job_task)=0
Have a worker ask for a task-message from the queue.
void loop()
The queue process's event loop.
virtual void add(JobTask job_task)=0
Enqueue a task.
void process_master_message(M2Q message)
Helper function for 'Queue::loop()'.
std::size_t N_tasks_at_workers_
void process_worker_message(std::size_t this_worker_id, W2Q message)
Helper function for 'Queue::loop()'.
Thrown when a blocking wait on a Channel is interrupted, e.g.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
combined job_object, state and task identifier type