Registry / async / async-ringbuffer

async-ringbuffer

JSON →
library0.5.5rscratesunverified

A nonblocking single-producer single-consumer ring buffer with fixed capacity.

# Cargo.toml [dependencies] async-ringbuffer = "0.5.5"
INSTALL
IMPORT
SIG · ASYNC-RINGBUFFER
A
async-ringbuffer
asyncrustv0.5.5
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.

RingBuffer
use async_ringbuffer::RingBuffer;

Create a ring buffer, push and pop a value asynchronously.

use async_ringbuffer::RingBuffer; #[tokio::main] async fn main() { let (mut producer, mut consumer) = RingBuffer::new(1024); producer.push(42).await.unwrap(); let val = consumer.pop().await.unwrap(); println!("Received: {}", val); }
Debug
Known issues
gotchaRequires an async runtime like Tokio or async-std.
fix
Add tokio as a dependency and use #[tokio::main] or similar.
affects: >=0.5.0
Upgrade
Version history
0.5.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
36
Resources
async-ringbuffer — cargo add async-ringbuffer · libregistry