]>
git.proxmox.com Git - rustc.git/blob - vendor/crossbeam-utils/src/lib.rs
1 //! Miscellaneous tools for concurrent programming.
5 //! * [`AtomicCell`], a thread-safe mutable memory location.
6 //! * [`AtomicConsume`], for reading from primitive atomic types with "consume" ordering.
8 //! ## Thread synchronization
10 //! * [`Parker`], a thread parking primitive.
11 //! * [`ShardedLock`], a sharded reader-writer lock with fast concurrent reads.
12 //! * [`WaitGroup`], for synchronizing the beginning or end of some computation.
16 //! * [`Backoff`], for exponential backoff in spin loops.
17 //! * [`CachePadded`], for padding and aligning a value to the length of a cache line.
18 //! * [`scope`], for spawning threads that borrow local variables from the stack.
20 //! [`AtomicCell`]: atomic/struct.AtomicCell.html
21 //! [`AtomicConsume`]: atomic/trait.AtomicConsume.html
22 //! [`Parker`]: sync/struct.Parker.html
23 //! [`ShardedLock`]: sync/struct.ShardedLock.html
24 //! [`WaitGroup`]: sync/struct.WaitGroup.html
25 //! [`Backoff`]: struct.Backoff.html
26 //! [`CachePadded`]: struct.CachePadded.html
27 //! [`scope`]: thread/fn.scope.html
29 #![warn(missing_docs)]
30 #![warn(missing_debug_implementations)]
31 #![cfg_attr(not(feature = "std"), no_std)]
32 #![cfg_attr(feature = "nightly", feature(alloc))]
33 #![cfg_attr(feature = "nightly", feature(cfg_target_has_atomic))]
37 #[cfg(feature = "std")]
41 if #[cfg(feature = "nightly")] {
54 pub use cache_padded
::CachePadded
;
57 pub use backoff
::Backoff
;
60 if #[cfg(feature = "std")] {
62 extern crate lazy_static
;