Buffer v0.2.0 Buffer.Queue View Source

FIFO queue implemented with Erlang :queue

Link to this section Summary

Functions

Creates a new emtpy buffer

Pops count items from the buffer. Returns {items, buffer}. If there are less than count items in the buffer all items are popped.

Pushes items into the buffer and returns the buffer

Returns the number of items in the buffer

Link to this section Functions

Creates a new emtpy buffer

Callback implementation for Buffer.new/0.

Link to this function

pop(queue, request_count)

View Source

Pops count items from the buffer. Returns {items, buffer}. If there are less than count items in the buffer all items are popped.

Callback implementation for Buffer.pop/2.

Pushes items into the buffer and returns the buffer

Callback implementation for Buffer.push/2.

Returns the number of items in the buffer

Callback implementation for Buffer.size/1.