Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ rtrb Public
forked from mgeier/rtrb

A realtime-safe single-producer single-consumer ring buffer

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

jjl/rtrb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Ring Buffer

A wait-free single-producer single-consumer ring buffer for Rust.

Usage

Add this to your Cargo.toml:

[dependencies]
rtrb = "0.1"

Development

Running the tests:

cargo test

Testing the benchmarks (without actually benchmarking):

cargo test --benches

Running the benchmarks (using the criterion crate; results will be available in target/criterion/report/index.html):

cargo bench

Creating the HTML docs (which will be available in target/doc/rtrb/index.html):

cargo doc

Minimum Supported rustc Version

This crate's minimum supported rustc version (MSRV) is 1.36.0. The MSRV is not expected to be updated frequently, but if it is, there will be (at least) a minor version bump.

Origin Story

The initial code has been ripped off of crossbeam-rs/crossbeam#338, with permission of the PR author @stjepang.

It has been isolated from the rest of crossbeam with git-filter-repo:

git-filter-repo --subdirectory-filter crossbeam-queue --path src/spsc.rs --path tests/spsc.rs --refs refs/heads/spsc

Alternatives

If you don't like this crate, no problem, there are several alternatives for you to choose from. There are many varieties of ring buffers available, here we limit the selection to wait-free SPSC implementations:

There are also implementations in other languages:

If you know more alternatives for this list, please open an issue.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A realtime-safe single-producer single-consumer ring buffer

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%