1# Crossbeam Queue 2 3[![Build Status](https://travis-ci.org/crossbeam-rs/crossbeam.svg?branch=master)]( 4https://travis-ci.org/crossbeam-rs/crossbeam) 5[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)]( 6https://github.com/crossbeam-rs/crossbeam-queue/tree/master/src) 7[![Cargo](https://img.shields.io/crates/v/crossbeam-queue.svg)]( 8https://crates.io/crates/crossbeam-queue) 9[![Documentation](https://docs.rs/crossbeam-queue/badge.svg)]( 10https://docs.rs/crossbeam-queue) 11[![Rust 1.26+](https://img.shields.io/badge/rust-1.26+-lightgray.svg)]( 12https://www.rust-lang.org) 13 14This crate provides concurrent queues that can be shared among threads: 15 16* [`ArrayQueue`], a bounded MPMC queue that allocates a fixed-capacity buffer on construction. 17* [`SegQueue`], an unbounded MPMC queue that allocates small buffers, segments, on demand. 18 19[`ArrayQueue`]: https://docs.rs/crossbeam-queue/*/crossbeam_queue/struct.ArrayQueue.html 20[`SegQueue`]: https://docs.rs/crossbeam-queue/*/crossbeam_queue/struct.SegQueue.html 21 22## Usage 23 24Add this to your `Cargo.toml`: 25 26```toml 27[dependencies] 28crossbeam-queue = "0.1" 29``` 30 31Next, add this to your crate: 32 33```rust 34extern crate crossbeam_queue; 35``` 36 37## Compatibility 38 39The minimum supported Rust version is 1.26. 40 41## License 42 43Licensed under either of 44 45 * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) 46 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) 47 48at your option. 49 50#### Contribution 51 52Unless you explicitly state otherwise, any contribution intentionally submitted 53for inclusion in the work by you, as defined in the Apache-2.0 license, shall be 54dual licensed as above, without any additional terms or conditions. 55 56#### Third party software 57 58This product includes copies and modifications of software developed by third parties: 59 60* [src/array_queue.rs](src/array_queue.rs) is based on 61 [Bounded MPMC queue](http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue) 62 by Dmitry Vyukov, licensed under the Simplified BSD License and the Apache License, Version 2.0. 63 64See the source code files for more details. 65 66Copies of third party licenses can be found in [LICENSE-THIRD-PARTY](LICENSE-THIRD-PARTY). 67