Go to file
dependabot[bot] 2d309371f8
deps: Update loom requirement from 0.6 to 0.7
Updates the requirements on [loom](https://github.com/tokio-rs/loom) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/loom/releases)
- [Changelog](https://github.com/tokio-rs/loom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/loom/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: loom
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-07 16:33:30 -07:00
.github Minimize GITHUB_TOKEN permissions 2023-03-26 16:30:28 +09:00
benches Add benchmarks for bounded queues (#24) 2022-08-25 02:09:34 +09:00
src Add smol-rs logo (#45) 2023-07-17 14:33:21 +09:00
tests Add alternate implementations of synchronization primitives (#27) 2022-10-07 06:48:10 -07:00
.gitignore Initial commit 2020-05-27 21:31:05 +02:00
CHANGELOG.md v2.2.0 (#38) 2023-04-07 10:53:32 -07:00
Cargo.toml deps: Update loom requirement from 0.6 to 0.7 2023-08-07 16:33:30 -07: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.