bbqueue
bbqueue copied to clipboard
MPSC Support Possible?
I might be missing something very obvious here, but it seems to me that BBQueue is very well setup to act as an MPSC queue. When taking a grant there is already a "lock" of sorts with write_in_progress. It seems like you could create a function that allows for the creation of multiple producers from the same underlying buffer. Something similar to https://github.com/jamesmunns/bbqueue/pull/78 would work. Of course this would make writes effectively have a lock, but there are cases where that might be an acceptable trade-off.
Are there any safety issues with the approach I outlined above, or other trade-offs I might have missed?