Public Member Functions | List of all members
SynchronizedQueue< T > Class Template Reference

A queue that uses a mutex to synchronise enqueue and dequeue calls. More...

#include <SynchronizedQueue.hpp>

Inheritance diagram for SynchronizedQueue< T >:
[legend]
Collaboration diagram for SynchronizedQueue< T >:
[legend]

Public Member Functions

dequeue () override
 Dequeue an object. More...
 
bool empty () const override
 Returns true if the queue is empty. More...
 
void enqueue (T &&element) override
 Enqueue an object, moving the supplied element. More...
 

Detailed Description

template<typename T>
class Balau::Container::SynchronizedQueue< T >

A queue that uses a mutex to synchronise enqueue and dequeue calls.

The underlying container is an std::list.

Template Parameters
Tthe element type (must be default constructable in addition being move constructable and assignable)

Member Function Documentation

◆ dequeue()

T dequeue ( )
inlineoverridevirtual

Dequeue an object.

Exceptions
EmptyExceptionif no elements are available for dequeueing

Implements Queue< T >.

◆ empty()

bool empty ( ) const
inlineoverridevirtual

Returns true if the queue is empty.

Implements Queue< T >.

◆ enqueue()

void enqueue ( T &&  element)
inlineoverridevirtual

Enqueue an object, moving the supplied element.

Implements Queue< T >.


The documentation for this class was generated from the following file: