rutz::circular_queue< T > Class Template Reference

Circular fixed-size queue; T must have a default constructor. More...

#include <rutz/circular_queue.h>

Collaboration diagram for rutz::circular_queue< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 circular_queue (const size_t n)
size_t size () const
 Get the number of spaces in the queue (not all of which may be currently occupied).
bool pop_front (T &dest)
 Returns true of the pop succeeded.
bool push_back (const T &val)
 Returns true if the push succeeded.

Classes

struct  entry


Detailed Description

template<class T>
class rutz::circular_queue< T >

Circular fixed-size queue; T must have a default constructor.

This class is designed to be used in a situation where one thread is filling the queue while another thread is emptying the queue; in that situation, no locks should be needed to access the queue safely.

Definition at line 48 of file circular_queue.h.


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

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:56:32 2008 by Doxygen version 1.5.5.