|
join 1.0
lightweight network framework library
|
single producer single consumer ring buffer. More...
#include <queue.hpp>
Public Types | |
| using | Queue = BasicQueue<Type, Backend, Spsc> |
| using | Segment = QueueSegment<Type, QueueSlotLight<Type>> |
Static Public Member Functions | |
| static int | tryPush (Segment *segment, const Type &element) noexcept |
| try to push element into the ring buffer. | |
| static ssize_t | tryPush (Segment *segment, const Type *elements, size_t size) noexcept |
| try to push multiple elements into the ring buffer. | |
| static int | tryPop (Segment *segment, Type &element) noexcept |
| try to pop element from the ring buffer. | |
| static ssize_t | tryPop (Segment *segment, Type *elements, size_t size) noexcept |
| try to pop multiple elements from the ring buffer. | |
single producer single consumer ring buffer.
| using join::Spsc< Type, Backend >::Queue = BasicQueue<Type, Backend, Spsc> |
| using join::Spsc< Type, Backend >::Segment = QueueSegment<Type, QueueSlotLight<Type>> |
|
inlinestaticnoexcept |
try to pop element from the ring buffer.
| segment | shared memory segment. |
| element | output element. |
|
inlinestaticnoexcept |
try to pop multiple elements from the ring buffer.
| segment | shared memory segment. |
| elements | pointer to the output buffer. |
| size | maximum number of elements to pop. |
|
inlinestaticnoexcept |
try to push element into the ring buffer.
| segment | shared memory segment. |
| element | element to push. |
|
inlinestaticnoexcept |
try to push multiple elements into the ring buffer.
| segment | shared memory segment. |
| elements | pointer to the first element. |
| size | number of elements to push. |