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