• Home
Name Date Size #Lines LOC

..--

benches/03-May-2024-713645

examples/03-May-2024-15683

src/03-May-2024-7,7154,245

tests/03-May-2024-10,9169,276

.cargo_vcs_info.jsonD03-May-2024111 66

Android.bpD03-May-20242.1 KiB6965

CHANGELOG.mdD03-May-20245.8 KiB211140

Cargo.lockD03-May-20243.1 KiB127112

Cargo.tomlD03-May-20241.3 KiB5547

Cargo.toml.origD03-May-2024995 3933

LICENSED03-May-202410.6 KiB202169

LICENSE-APACHED03-May-202410.6 KiB202169

LICENSE-MITD03-May-20241.1 KiB2823

LICENSE-THIRD-PARTYD03-May-202432.7 KiB594519

METADATAD03-May-2024683 2422

MODULE_LICENSE_APACHE2D03-May-20240

OWNERSD03-May-202440 21

README.mdD03-May-20243.7 KiB8561

TEST_MAPPINGD03-May-2024397 2120

cargo2android.jsonD03-May-202435 44

README.md

1# Crossbeam Channel
2
3[![Build Status](https://github.com/crossbeam-rs/crossbeam/workflows/CI/badge.svg)](
4https://github.com/crossbeam-rs/crossbeam/actions)
5[![License](https://img.shields.io/badge/license-MIT_OR_Apache--2.0-blue.svg)](
6https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-channel#license)
7[![Cargo](https://img.shields.io/crates/v/crossbeam-channel.svg)](
8https://crates.io/crates/crossbeam-channel)
9[![Documentation](https://docs.rs/crossbeam-channel/badge.svg)](
10https://docs.rs/crossbeam-channel)
11[![Rust 1.38+](https://img.shields.io/badge/rust-1.38+-lightgray.svg)](
12https://www.rust-lang.org)
13[![chat](https://img.shields.io/discord/569610676205781012.svg?logo=discord)](https://discord.com/invite/JXYwgWZ)
14
15This crate provides multi-producer multi-consumer channels for message passing.
16It is an alternative to [`std::sync::mpsc`] with more features and better performance.
17
18Some highlights:
19
20* [`Sender`]s and [`Receiver`]s can be cloned and shared among threads.
21* Two main kinds of channels are [`bounded`] and [`unbounded`].
22* Convenient extra channels like [`after`], [`never`], and [`tick`].
23* The [`select!`] macro can block on multiple channel operations.
24* [`Select`] can select over a dynamically built list of channel operations.
25* Channels use locks very sparingly for maximum [performance](benchmarks).
26
27[`std::sync::mpsc`]: https://doc.rust-lang.org/std/sync/mpsc/index.html
28[`Sender`]: https://docs.rs/crossbeam-channel/*/crossbeam_channel/struct.Sender.html
29[`Receiver`]: https://docs.rs/crossbeam-channel/*/crossbeam_channel/struct.Receiver.html
30[`bounded`]: https://docs.rs/crossbeam-channel/*/crossbeam_channel/fn.bounded.html
31[`unbounded`]: https://docs.rs/crossbeam-channel/*/crossbeam_channel/fn.unbounded.html
32[`after`]: https://docs.rs/crossbeam-channel/*/crossbeam_channel/fn.after.html
33[`never`]: https://docs.rs/crossbeam-channel/*/crossbeam_channel/fn.never.html
34[`tick`]: https://docs.rs/crossbeam-channel/*/crossbeam_channel/fn.tick.html
35[`select!`]: https://docs.rs/crossbeam-channel/*/crossbeam_channel/macro.select.html
36[`Select`]: https://docs.rs/crossbeam-channel/*/crossbeam_channel/struct.Select.html
37
38## Usage
39
40Add this to your `Cargo.toml`:
41
42```toml
43[dependencies]
44crossbeam-channel = "0.5"
45```
46
47## Compatibility
48
49Crossbeam Channel supports stable Rust releases going back at least six months,
50and every time the minimum supported Rust version is increased, a new minor
51version is released. Currently, the minimum supported Rust version is 1.38.
52
53## License
54
55Licensed under either of
56
57 * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
58 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
59
60at your option.
61
62#### Contribution
63
64Unless you explicitly state otherwise, any contribution intentionally submitted
65for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
66dual licensed as above, without any additional terms or conditions.
67
68#### Third party software
69
70This product includes copies and modifications of software developed by third parties:
71
72* [examples/matching.rs](examples/matching.rs) includes
73  [matching.go](http://www.nada.kth.se/~snilsson/concurrency/src/matching.go) by Stefan Nilsson,
74  licensed under Creative Commons Attribution 3.0 Unported License.
75
76* [tests/mpsc.rs](tests/mpsc.rs) includes modifications of code from The Rust Programming Language,
77  licensed under the MIT License and the Apache License, Version 2.0.
78
79* [tests/golang.rs](tests/golang.rs) is based on code from The Go Programming Language, licensed
80  under the 3-Clause BSD License.
81
82See the source code files for more details.
83
84Copies of third party licenses can be found in [LICENSE-THIRD-PARTY](LICENSE-THIRD-PARTY).
85