Expand description
This module defines types which are thread safe if cfg!(feature = "concurrent")
is true.
Lrc
is an alias of either Rc or Arc.
Lock
is a mutex.
It internally uses parking_lot::Mutex
if cfg!(parallel_queries) is true,
RefCell
otherwise.
RwLock
is a read-write lock.
It internally uses parking_lot::RwLock
if cfg!(parallel_queries) is true,
RefCell
otherwise.
LockCell
is a thread safe version of Cell
, with set
and get
operations. It can never deadlock. It uses Cell
when
cfg!(parallel_queries) is false, otherwise it is a Lock
.
MTLock
is a mutex which disappears if cfg!(parallel_queries) is false.
MTRef
is a immutable reference if cfg!(parallel_queries), and an mutable
reference otherwise.
rustc_erase_owner!
erases a OwningRef owner into Erased or Erased + Send +
Sync depending on the value of cfg!(parallel_queries).
Structs§
- Lazy
- A value which is initialized on the first access.
- Lock
- Lock
Cell - Lrc
- A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
- Once
Cell - A thread-safe cell which can be written to only once.
- RwLock
Traits§
- Hash
MapExt - Send
- Types that can be transferred across thread boundaries.
- Sync
- Types for which it is safe to share references between threads.
Type Aliases§
- Lock
Guard - An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
- Mapped
Lock Guard - An RAII mutex guard returned by
MutexGuard::map
, which can point to a subfield of the protected data. - Mapped
Read Guard - An RAII read lock guard returned by
RwLockReadGuard::map
, which can point to a subfield of the protected data. - Mapped
Write Guard - An RAII write lock guard returned by
RwLockWriteGuard::map
, which can point to a subfield of the protected data. - Read
Guard - RAII structure used to release the shared read access of a lock when dropped.
- Write
Guard - RAII structure used to release the exclusive write access of a lock when dropped.