Struct spinny::RawRwSpinlock
source · [−]pub struct RawRwSpinlock(_);
👎Deprecated since 0.2.4: Use spin-rs instead
Expand description
Raw spinlock rwlock, wrapped in the lock_api
RwLock struct.
Trait Implementations
sourceimpl RawRwLock for RawRwSpinlock
impl RawRwLock for RawRwSpinlock
sourceconst INIT: RawRwSpinlock = _
const INIT: RawRwSpinlock = _
Initial value for an unlocked
RwLock
.type GuardMarker = GuardSend
type GuardMarker = GuardSend
Marker type which determines whether a lock guard should be
Send
. Use
one of the GuardSend
or GuardNoSend
helper types here. Read moreAcquires a shared lock, blocking the current thread until it is able to do so.
Attempts to acquire a shared lock without blocking.
sourcefn try_lock_exclusive(&self) -> bool
fn try_lock_exclusive(&self) -> bool
Attempts to acquire an exclusive lock without blocking.
sourcefn lock_exclusive(&self)
fn lock_exclusive(&self)
Acquires an exclusive lock, blocking the current thread until it is able to do so.
Releases a shared lock. Read more
sourceunsafe fn unlock_exclusive(&self)
unsafe fn unlock_exclusive(&self)
Releases an exclusive lock. Read more
sourcefn is_locked_exclusive(&self) -> bool
fn is_locked_exclusive(&self) -> bool
Check if this
RwLock
is currently exclusively locked.sourceimpl RawRwLockDowngrade for RawRwSpinlock
impl RawRwLockDowngrade for RawRwSpinlock
sourceimpl RawRwLockUpgrade for RawRwSpinlock
impl RawRwLockUpgrade for RawRwSpinlock
sourcefn lock_upgradable(&self)
fn lock_upgradable(&self)
Acquires an upgradable lock, blocking the current thread until it is able to do so.
sourcefn try_lock_upgradable(&self) -> bool
fn try_lock_upgradable(&self) -> bool
Attempts to acquire an upgradable lock without blocking.
sourceunsafe fn try_upgrade(&self) -> bool
unsafe fn try_upgrade(&self) -> bool
Attempts to upgrade an upgradable lock to an exclusive lock without
blocking. Read more
sourceunsafe fn unlock_upgradable(&self)
unsafe fn unlock_upgradable(&self)
Releases an upgradable lock. Read more
Auto Trait Implementations
impl RefUnwindSafe for RawRwSpinlock
impl Send for RawRwSpinlock
impl Sync for RawRwSpinlock
impl Unpin for RawRwSpinlock
impl UnwindSafe for RawRwSpinlock
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more