Registry / async / bbqueue

bbqueue

JSON →
library0.7.0rscratesunverified

A single-producer, single-consumer, lockless, no_std, thread-safe queue based on BipBuffers.

# Cargo.toml [dependencies] bbqueue = "0.7.0"
INSTALL
IMPORT
SIG · BBQUEUE
B
bbqueue
asyncrustv0.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BBQueue
use bbqueue::BBQueue;

Create a BBQueue, split into producer and consumer, write and read data.

use bbqueue::BBQueue; fn main() { let bb: BBQueue<100> = BBQueue::new(); let (mut prod, mut cons) = bb.split(); prod.grant(5).unwrap().copy_from_slice(b"hello"); prod.commit(5); let r = cons.read().unwrap(); assert_eq!(&*r, b"hello"); r.release(); }
Debug
Known issues
gotchaBBQueue requires careful handling of grant/commit/release; forgetting to commit or release can cause deadlocks or data loss.
fix
Always call commit after writing to a grant, and release after reading.
affects: >=0.7.0
Upgrade
Version history
0.7.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
46 hits · last 30 days
node
38
Resources
bbqueue — cargo add bbqueue · libregistry