crossbeam_queue/
lib.rs

1//! Concurrent queues.
2//!
3//! This crate provides concurrent queues that can be shared among threads:
4//!
5//! * [`ArrayQueue`], a bounded MPMC queue that allocates a fixed-capacity buffer on construction.
6//! * [`SegQueue`], an unbounded MPMC queue that allocates small buffers, segments, on demand.
7
8#![no_std]
9#![doc(test(
10    no_crate_inject,
11    attr(
12        deny(warnings, rust_2018_idioms),
13        allow(dead_code, unused_assignments, unused_variables)
14    )
15))]
16#![warn(
17    missing_docs,
18    missing_debug_implementations,
19    rust_2018_idioms,
20    unreachable_pub
21)]
22
23#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
24extern crate alloc;
25#[cfg(feature = "std")]
26extern crate std;
27
28#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
29mod array_queue;
30#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
31mod seg_queue;
32
33#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
34pub use crate::{array_queue::ArrayQueue, seg_queue::SegQueue};