bounded-spsc-queue
bounded-spsc-queue copied to clipboard
A Bounded SPSC queue for Rust
I figured I'd have to adapt the code a bit to remove that, but right now as of 2020 just by removing the feature the code compile just fine with...
Feature allocator_api is stable now, so stable rust can compile the crate without this attribute. Fixes #9.
The line in question: `unsafe impl Sync for Buffer {}` So, as far as I know [this](https://github.com/polyfractal/bounded-spsc-queue/blob/master/src/lib.rs#L55) should line should be removed. Buffer inherits !Send and !Sync from the *mut...
Currently, if you try to request too much memory for the queue and allocation fails, we throw an OOM panic. That's pretty unfriendly :) Instead, we should return a `Result`...
Classic nightly, moving out from under you all the time. Anyway, this fails to build again on 1.30. ```rust error[E0425]: cannot find function oom in module alloc --> ...\github.com-1ecc6299db9ec823\bounded-spsc-queue-0.3.0\src\lib.rs:351:260.3.0\src\lib.rs:351:26 |...
So zero sized types can be used in the queue. Fixes #15 & #16.
Hi, this pr adds `pop_n` function for the same reasons as in #8, I think it could be useful, this function attempts to pop at most `target.len()` values off the...
In low-latency applications, it's often desirable to drop old items from the queue in favor of newer items. A suitable interface might be something like: ``` fn force_push(&self, v: T)...