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(not(crossbeam_no_atomic_cas))] 24 cfg_if::cfg_if! { 25 if #[cfg(feature = "alloc")] { 26 extern crate alloc; 27 28 mod array_queue; 29 mod seg_queue; 30 31 pub use self::array_queue::ArrayQueue; 32 pub use self::seg_queue::SegQueue; 33 } 34 } 35