Go to file
Taiki Endo 9f6f5d3188 ci: Use cargo-hack's --rust-version flag for msrv check
This respects rust-version field in Cargo.toml, so it removes the need
to manage MSRV in both the CI file and Cargo.toml.
2024-01-07 01:57:36 +09:00
.github ci: Use cargo-hack's --rust-version flag for msrv check 2024-01-07 01:57:36 +09:00
benches Add benchmarks for bounded queues (#24) 2022-08-25 02:09:34 +09:00
src bugfix: Remove the heap allocation from non-single queues 2023-11-15 18:08:17 -08:00
tests tests: Add WASM testing 2023-12-16 11:20:15 -08:00
.gitignore Initial commit 2020-05-27 21:31:05 +02:00
CHANGELOG.md v2.4.0 2023-12-02 10:59:27 -08:00
Cargo.toml Update criterion requirement from 0.4.0 to 0.5 (#42) 2024-01-07 01:51:40 +09:00
LICENSE-APACHE Initial commit 2020-05-27 21:31:05 +02:00
LICENSE-MIT Initial commit 2020-05-27 21:31:05 +02:00
README.md Update license badge to match Cargo.toml 2021-02-14 13:37:47 +09:00

README.md

concurrent-queue

Build License Cargo Documentation

A concurrent multi-producer multi-consumer queue.

There are two kinds of queues:

  1. Bounded queue with limited capacity.
  2. Unbounded queue with unlimited capacity.

Queues also have the capability to get closed at any point. When closed, no more items can be pushed into the queue, although the remaining items can still be popped.

These features make it easy to build channels similar to std::sync::mpsc on top of this crate.

Examples

use concurrent_queue::ConcurrentQueue;

let q = ConcurrentQueue::unbounded();
q.push(1).unwrap();
q.push(2).unwrap();

assert_eq!(q.pop(), Ok(1));
assert_eq!(q.pop(), Ok(2));

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.