Skip to content

Conversation

ripose-jp
Copy link
Contributor

ring_buffer: add max_size and full functions

Add a max_size() function which returns the maximum size of the ring buffer. This returns the num_elements template parameter.

Add a full() function which checks if the size is equal to max_size(). This is useful in cases where code may not want to block on a produce() call.

ring_buffer: add notify producer and consumer functions

Add ability to notify producers and consumers without shutting the ring buffer down. This is useful in cases where an operation should stop blocking the current execution without making the ring buffer non-functional

Add a max_size() function which returns the maximum size of the
ring_buffer. This returns the num_elements template parameter.

Add a full() function which checks if the size is equal to max_size.
This is useful in cases where code may not want to block on a produce()
call.
Add ability to notify producers and consumers without shutting the
ring buffer down. This is useful in cases where an operation should
stop blocking the current execution without making the ring buffer
non-functional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant