Class ReadyQueue
Defined in File scheduler.hh
Class Documentation
-
class ReadyQueue
Public Functions
-
inline explicit ReadyQueue(unsigned num_workers)
-
auto pop() -> Reaction*
Retrieve a ready reaction from the queue.
This method may be called concurrently. In case the queue is empty, the method blocks and waits until a ready reaction becomes available.
-
void fill_up(std::vector<Reaction*> &ready_reactions)
Fill the queue up with ready reactions.
This method assumes that the internal queue is empty. It moves all reactions from the provided
ready_reactionsvector to the internal queue, leavingready_reactionsempty.Note that this method is not thread-safe. The caller needs to ensure that no other thread will try to read from the queue during this operation.
-
inline explicit ReadyQueue(unsigned num_workers)