libcoro
libcoro copied to clipboard
ring_buffer: add max_size, full, notify_producers, and notify_consumers
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