IRingQueue

Base class for a fixed size memory-based ring queue.

Constructors

this
this(size_t dimension)

Constructor. The queue's memory buffer is allocated by the GC.

this
this(IMemManager mem_manager, size_t dimension)

Constructor. Allocates the queue's memory buffer with the provided memory manager.

Destructor

~this
~this()

Called for explicit deletes and on collection

Members

Functions

clear
void clear()

Removes all items from the queue.

free_space
ulong free_space()
get_data
ubyte[] get_data()
Undocumented in source. Be warned that the author may not have intended to support it.
get_items
size_t get_items()
Undocumented in source. Be warned that the author may not have intended to support it.
get_read_from
size_t get_read_from()
Undocumented in source. Be warned that the author may not have intended to support it.
get_write_to
size_t get_write_to()
Undocumented in source. Be warned that the author may not have intended to support it.
is_empty
bool is_empty()

Tells whether the queue is empty.

length
size_t length()
total_space
ulong total_space()
used_space
ulong used_space()

Variables

data
ubyte[] data;

Data array -- the actual queue where the items are stored.

items
uint items;

Number of items in the queue.

read_from
size_t read_from;
Undocumented in source.
write_to
size_t write_to;

Read & write positions (indices into the data array).

Meta