• R/O
  • HTTP
  • SSH
  • HTTPS

Source Tree

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

crossbeamパッケージ


Nome Tamanho Rev. Hora Autor Mensagem de Log
ci
crossbeam-channel
crossbeam-deque
crossbeam-epoch
crossbeam-queue
crossbeam-skiplist
crossbeam-utils
debian
src
tests
.gitignore 91 6686ece 2019-05-25 19:32:55 bors[bot] Merge #358 358: Add Select::{clear,d...
.travis.yml 2.53 k e3fa197 2019-10-16 20:55:18 Taiki Endo Drop support for 1.26 and 1.27
CHANGELOG.md 2.5 k c76f145 2019-11-05 20:24:04 Taiki Endo Prepare for the next release - cross...
Cargo.toml 1.71 k c76f145 2019-11-05 20:24:04 Taiki Endo Prepare for the next release - cross...
LICENSE-APACHE 10.6 k d2ab7a5 2019-10-26 04:07:32 Stjepan Glavina Update LICENSE-APACHE
LICENSE-MIT 1.07 k 6686ece 2019-05-25 19:32:55 bors[bot] Merge #358 358: Add Select::{clear,d...
README.md 6.66 k d953f49 2019-11-05 20:43:31 Taiki Endo Add compatibility section to readme ...
bors.toml 51 6686ece 2019-05-25 19:32:55 bors[bot] Merge #358 358: Add Select::{clear,d...

README.md

Crossbeam

Build Status License Cargo Documentation Rust 1.28+ chat

This crate provides a set of tools for concurrent programming:

Atomics

  • [AtomicCell], a thread-safe mutable memory location.(no_std)
  • [AtomicConsume], for reading from primitive atomic types with "consume" ordering.(no_std)

Data structures

  • [deque], work-stealing deques for building task schedulers.
  • [ArrayQueue], a bounded MPMC queue that allocates a fixed-capacity buffer on construction.
  • [SegQueue], an unbounded MPMC queue that allocates small buffers, segments, on demand.

Memory management

  • [epoch], an epoch-based garbage collector.(alloc)

Thread synchronization

  • [channel], multi-producer multi-consumer channels for message passing.
  • [Parker], a thread parking primitive.
  • [ShardedLock], a sharded reader-writer lock with fast concurrent reads.
  • [WaitGroup], for synchronizing the beginning or end of some computation.

Utilities

  • [Backoff], for exponential backoff in spin loops.(no_std)
  • [CachePadded], for padding and aligning a value to the length of a cache line.(no_std)
  • [scope], for spawning threads that borrow local variables from the stack.

Features marked with (no_std) can be used in no_std environments.
Features marked with (alloc) can be used in no_std environments, but only if alloc and nightly are enabled.

Crates

The main crossbeam crate just re-exports tools from smaller subcrates:

  • crossbeam-channel provides multi-producer multi-consumer channels for message passing.
  • crossbeam-deque provides work-stealing deques, which are primarily intended for building task schedulers.
  • crossbeam-epoch provides epoch-based garbage collection for building concurrent data structures.
  • crossbeam-queue provides concurrent queues that can be shared among threads.
  • crossbeam-utils provides atomics, synchronization primitives, scoped threads, and other utilities.

There is one more experimental subcrate that is not yet included in crossbeam:

Usage

Add this to your Cargo.toml:

[dependencies]
crossbeam = "0.7"

Next, add this to your crate:

extern crate crossbeam;

Compatibility

The minimum supported Rust version is 1.28. Any change to this is considered a breaking change.

Contributing

Crossbeam welcomes contribution from everyone in the form of suggestions, bug reports, pull requests, and feedback. 💛

If you need ideas for contribution, there are several ways to get started:

RFCs

We also have the RFCs repository for more high-level discussion, which is the place where we brainstorm ideas and propose substantial changes to Crossbeam.

You are welcome to participate in any open issues or pull requests.

Learning resources

If you'd like to learn more about concurrency and non-blocking data structures, there's a list of learning resources in our wiki, which includes relevant blog posts, papers, videos, and other similar projects.

Another good place to visit is merged RFCs. They contain elaborate descriptions and rationale for features we've introduced to Crossbeam, but keep in mind that some of the written information is now out of date.

Conduct

The Crossbeam project adheres to the Rust Code of Conduct. This describes the minimum behavior expected from all contributors.

License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Some Crossbeam subcrates have additional licensing notices. Take a look at other readme files in this repository for more information.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.