Telamon
|
This is the main class representing the help queue. More...
#include <HelpQueue.hh>
Classes | |
struct | Node |
The class which represents a node element of the queue. More... | |
struct | OperationDescription |
Operation description for the queue used when the queue itself needs "helping". More... | |
Public Types | |
enum class | Operation : int { enqueue } |
Public Member Functions | |
void | push_back (const int enqueuer, T element) |
Enqueue an element to the tail of the queue. More... | |
std::optional< T > | peek_front () const |
Peek the head of the queue. More... | |
bool | try_pop_front (T expected_head) |
Dequeues iff the given value is the same as the value at the head of the queue. More... | |
This is the main class representing the help queue.
|
inline |
Peek the head of the queue.
|
inline |
Enqueue an element to the tail of the queue.
element | The element to be enqueued |
enqueuer | The id of the thread which enqueues the element |
|
inline |
Dequeues iff the given value is the same as the value at the head of the queue.
expected_head | The value which the head is expected to be |