mkelk / MD_CirQueue

FIFO queue for generalised items, implemented as a circular buffer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MD_CirQueue Generalized Circular Queue Library

arduino-library-badge

This library implements a FIFO queue for generalized items, implemented as a circular buffer. The number and size of the items that are enqueued is defined in the constructor, after which the calling program can push and pop items in FIFO order from the queue. When the queue is full the library accommodates both overwriting the oldest item in the queue or failing the current push() attempt.

This mechanism is useful for holding data that needs to be asynchronously transferred between different parts of an application (eg. multiple data streams queued up for one 'consumer' task).

If you like and use this library please consider making a small donation using PayPal

Library Documentation

About

FIFO queue for generalised items, implemented as a circular buffer

License:GNU Lesser General Public License v2.1


Languages

Language:C++ 100.0%