Expand description
A module containing lock_api-based lock types that are or are not Send + Sync
depending on whether the threading feature of this module is enabled.
Structs§
- Immutable
Mapped Mutex Guard - A mutex guard that has an exclusive lock, but only an immutable reference; useful if you
need to map a mutex guard with a function that returns an
&T. Construct using theMapImmutabletrait. - Lazy
Cell - A value which is initialized on the first access.
- Lazy
Lock - A value which is initialized on the first access.
- Mapped
Thread Mutex Guard - Once
Cell - A cell which can nominally be written to only once.
- RawDetaching
RwLock - A reader-writer lock whose blocking acquires detach first, and which is the raw lock it wraps in every other respect.
- RawMutex
- RawRw
Lock - RawThread
Id - RawThread
Mutex - A mutex type that knows when it would deadlock
- Thread
Mutex - Thread
Mutex Guard
Enums§
Traits§
Functions§
- reinit_
mutex_ ⚠after_ fork - Reset a
PyMutexafterfork(). Seezero_reinit_after_fork. - reinit_
rwlock_ ⚠after_ fork - Reset a
PyRwLockafterfork(). Seezero_reinit_after_fork. - reinit_
thread_ ⚠mutex_ after_ fork - Reset a
PyThreadMutexto its initial (unlocked, unowned) state afterfork(). - zero_
reinit_ ⚠after_ fork - Reset a lock to its initial (unlocked) state by zeroing its bytes.
Type Aliases§
- PyDetaching
RwLock - A
PyRwLockfor data a thread may hold locked across a blocking call. - PyDetaching
RwLock Read Guard - PyDetaching
RwLock Write Guard - PyImmutable
Mapped Mutex Guard - PyMapped
Detaching RwLock Read Guard - PyMapped
Detaching RwLock Write Guard - PyMapped
Mutex Guard - PyMapped
RwLock Read Guard - PyMapped
RwLock Write Guard - PyMapped
Thread Mutex Guard - PyMutex
- PyMutex
Guard - PyRw
Lock - PyRw
Lock Read Guard - PyRw
Lock Upgradable Read Guard - PyRw
Lock Write Guard - PyThread
Mutex - PyThread
Mutex Guard