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

..03-May-2022-

benches/H03-May-2022-158128

src/H03-May-2022-3,3251,386

tests/H03-May-2022-896728

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

.cargo_vcs_info.jsonH A D22-Feb-202074 65

CHANGELOG.mdH A D22-Feb-20202.6 KiB11474

Cargo.tomlH A D22-Feb-20201.3 KiB4137

Cargo.toml.orig-cargoH A D22-Feb-2020866 3328

LICENSE-APACHEH A D23-Apr-201910.6 KiB202169

LICENSE-MITH A D11-Jun-20191.1 KiB2823

README.mdH A D22-Feb-20203 KiB7854

build.rsH A D22-Feb-2020527 1512

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.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 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.7"
52```
53
54Next, add this to your crate:
55
56```rust
57extern crate crossbeam_utils;
58```
59
60## Compatibility
61
62The minimum supported Rust version is 1.28. Any change to this is considered a breaking change.
63
64## License
65
66Licensed under either of
67
68 * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
69 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
70
71at your option.
72
73#### Contribution
74
75Unless you explicitly state otherwise, any contribution intentionally submitted
76for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
77dual licensed as above, without any additional terms or conditions.
78