bbqueue icon indicating copy to clipboard operation
bbqueue copied to clipboard

Convenient Heap use of BBBuffer

Open jamesmunns opened this issue 6 years ago • 1 comments

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>>.

jamesmunns avatar Dec 04 '19 14:12 jamesmunns

This would remove the need to use scoped threads with non-static BBBuffers.

jamesmunns avatar Dec 04 '19 14:12 jamesmunns