• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

benches/H03-May-2022-158128

src/H03-May-2022-3,1541,305

tests/H03-May-2022-888724

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D01-Jan-197074 65

CHANGELOG.mdH A D24-Jul-20192.2 KiB9864

Cargo.tomlH A D01-Jan-19701.2 KiB3935

Cargo.toml.orig-cargoH A D24-Jul-2019830 3026

LICENSE-APACHEH A D18-Jan-201910.6 KiB202169

LICENSE-MITH A D13-Jun-20191.1 KiB2823

README.mdH A D13-Jun-20192.9 KiB7452

README.md

1# Crossbeam Utils
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-utils/tree/master/src)
7[![Cargo](https://img.shields.io/crates/v/crossbeam-utils.svg)](
8https://crates.io/crates/crossbeam-utils)
9[![Documentation](https://docs.rs/crossbeam-utils/badge.svg)](
10https://docs.rs/crossbeam-utils)
11[![Rust 1.26+](https://img.shields.io/badge/rust-1.26+-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 miscellaneous tools for concurrent programming:
16
17#### Atomics
18
19* [`AtomicCell`], a thread-safe mutable memory location.<sup>(no_std)</sup>
20* [`AtomicConsume`], for reading from primitive atomic types with "consume" ordering.<sup>(no_std)</sup>
21
22#### Thread synchronization
23
24* [`Parker`], a thread parking primitive.
25* [`ShardedLock`], a sharded reader-writer lock with fast concurrent reads.
26* [`WaitGroup`], for synchronizing the beginning or end of some computation.
27
28#### Utilities
29
30* [`Backoff`], for exponential backoff in spin loops.<sup>(no_std)</sup>
31* [`CachePadded`], for padding and aligning a value to the length of a cache line.<sup>(no_std)</sup>
32* [`scope`], for spawning threads that borrow local variables from the stack.
33
34*Features marked with <sup>(no_std)</sup> can be used in `no_std` environments.*<br/>
35
36[`AtomicCell`]: https://docs.rs/crossbeam-utils/*/crossbeam_utils/atomic/struct.AtomicCell.html
37[`AtomicConsume`]: https://docs.rs/crossbeam-utils/*/crossbeam_utils/atomic/trait.AtomicConsume.html
38[`Parker`]: https://docs.rs/crossbeam-utils/*/crossbeam_utils/sync/struct.Parker.html
39[`ShardedLock`]: https://docs.rs/crossbeam-utils/*/crossbeam_utils/sync/struct.ShardedLock.html
40[`WaitGroup`]: https://docs.rs/crossbeam-utils/*/crossbeam_utils/sync/struct.WaitGroup.html
41[`Backoff`]: https://docs.rs/crossbeam-utils/*/crossbeam_utils/struct.Backoff.html
42[`CachePadded`]: https://docs.rs/crossbeam-utils/*/crossbeam_utils/struct.CachePadded.html
43[`scope`]: https://docs.rs/crossbeam-utils/*/crossbeam_utils/thread/fn.scope.html
44
45## Usage
46
47Add this to your `Cargo.toml`:
48
49```toml
50[dependencies]
51crossbeam-utils = "0.6"
52```
53
54Next, add this to your crate:
55
56```rust
57extern crate crossbeam_utils;
58```
59
60## License
61
62Licensed under either of
63
64 * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
65 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
66
67at your option.
68
69#### Contribution
70
71Unless you explicitly state otherwise, any contribution intentionally submitted
72for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
73dual licensed as above, without any additional terms or conditions.
74