Matthias Geier
Matthias Geier
The two SPSC ringbuffer implementations I know have a way to read/write multiple "items" at a time (and a way of checking how much space is there to read/write). Would...
@stjepang I'm a total Rust beginner and I'm not at all an expert on lock-free data structures. Please bear that in mind! I didn't think about uninitialized memory. The implementations...
Thanks @stjepang, this looks very promising! But we would still need two slices, right? I guess something like (probably using the plural `as_slices()`?): ```rust fn as_slice(&mut self) -> (&mut [T],...
> Would you be happy with this API? Yes, thanks, that looks very nice! Please excuse my ignorance, but I have several more questions: One open question for me is...
Thanks for the answers, I think I'm starting to understand! And thanks for the iterator examples! Those look very nice, so I think we don't need any additional API for...
> You can't do `let x = slice[0]` to take a value from the slot, that won't compile. Sure, but isn't that the user's problem for trying to move a...
I forgot something: I still think `Producer::is_empty()` and `Consumer::is_full()` are superfluous. At best they are useless, but they may be actually confusing and are definitely a waste of space and...
> Oh, I see now. So you just want to read values by reference and not really take them out (i.e. "consume" them by value). I just kinda assumed you'd...
Your `PopIter` idea sounds really interesting! It looks like a more ergonomic version of your `PopBatch::pop()` idea above (https://github.com/crossbeam-rs/crossbeam/pull/338#issuecomment-485367921). It may seem a bit asymmetric to have only `Consumer::pop_iter()` and...
> we [...] don't have `write_slices()` due to problems with uninitialized memory Based on your comments above, I thought those problems could be solved! I was expecting something like this...