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#![doc(test(
9    no_crate_inject,
10    attr(
11        deny(warnings, rust_2018_idioms),
12        allow(dead_code, unused_assignments, unused_variables)
13    )
14))]
15#![warn(
16    missing_docs,
17    missing_debug_implementations,
18    rust_2018_idioms,
19    unreachable_pub
20)]
21#![cfg_attr(not(feature = "std"), no_std)]
22
23#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
24extern crate alloc;
25
26#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
27mod array_queue;
28#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
29mod seg_queue;
30
31#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))]
32pub use crate::{array_queue::ArrayQueue, seg_queue::SegQueue};