[−][src]Module rustc_ap_rustc_data_structures::sync
This module defines types which are thread safe if cfg!(parallel_compiler) is true.
Lrc
is an alias of Arc
if cfg!(parallel_compiler) is true, Rc
otherwise.
Lock
is a mutex.
It internally uses parking_lot::Mutex
if cfg!(parallel_compiler) is true,
RefCell
otherwise.
RwLock
is a read-write lock.
It internally uses parking_lot::RwLock
if cfg!(parallel_compiler) is true,
RefCell
otherwise.
MTLock
is a mutex which disappears if cfg!(parallel_compiler) is false.
MTRef
is an immutable reference if cfg!(parallel_compiler), and a mutable reference otherwise.
rustc_erase_owner!
erases a OwningRef owner into Erased or Erased + Send + Sync
depending on the value of cfg!(parallel_compiler).
Re-exports
pub use std::sync::atomic::Ordering::SeqCst; |
Structs
Atomic | This is a single threaded variant of |
AtomicCell | This is a single threaded variant of AtomicCell provided by crossbeam.
Unlike |
Lock | |
LockGuard | A wrapper type for a mutably borrowed value from a |
Lrc | A single-threaded reference-counting pointer. 'Rc' stands for 'Reference Counted'. |
MTLock | |
MappedLockGuard | A wrapper type for a mutably borrowed value from a |
MappedReadGuard | Wraps a borrowed reference to a value in a |
MappedWriteGuard | A wrapper type for a mutably borrowed value from a |
OnceCell | A cell which can be written to only once. It is not thread safe. |
OneThread | A type which only allows its inner value to be used in one thread. It will panic if it is used on multiple threads. |
ReadGuard | Wraps a borrowed reference to a value in a |
RwLock | |
SerialScope | |
Weak |
|
WorkerLocal | |
WriteGuard | A wrapper type for a mutably borrowed value from a |
Enums
Ordering | Atomic memory orderings |
Traits
HashMapExt | |
ParallelIterator | An interface for dealing with iterators. |
Send | |
Sync |
Functions
assert_send | |
assert_send_sync_val | |
assert_send_val | |
assert_sync | |
join | |
par_for_each_in | |
par_iter | |
scope |
Type Definitions
AtomicBool | |
AtomicU32 | |
AtomicU64 | |
AtomicUsize | |
MTRef | |
MetadataRef |