bbqueue
bbqueue copied to clipboard
Convenient Heap use of BBBuffer
It would be good to have a heap allocated version of BBBuffer, that would automatically be dropped when the Producer and Consumer (and all grants) have been dropped.
This should be possible by replacing the NonNull references in the producer or consumer with an Arc reference, and likely providing a constructor for BBBuffer with something like ::new_arc() with the buffer located in something like an Arc<Box<BBBuffer>>.
This would remove the need to use scoped threads with non-static BBBuffers.