Struct maitake_sync::spin::RwSpinlock
source · pub struct RwSpinlock { /* private fields */ }
Expand description
A spinlock-based RawRwLock
implementation.
This type implements the blocking::RawRwLock
trait. This allows it to be
used with the blocking::RwLock
type when a spinlock-based reader-writer
lock is needed.
Trait Implementations§
source§impl Debug for RwSpinlock
impl Debug for RwSpinlock
source§impl RawRwLock for RwSpinlock
impl RawRwLock for RwSpinlock
§type GuardMarker = ()
type GuardMarker = ()
Marker type which determines whether a lock guard should be
Send
.Acquires a shared lock, blocking the current thread/CPU core until it is
able to do so.
Attempts to acquire a shared lock without blocking.
Releases a shared lock. Read more
source§fn lock_exclusive(&self)
fn lock_exclusive(&self)
Acquires an exclusive lock, blocking the current thread/CPU core until
it is able to do so.
source§fn try_lock_exclusive(&self) -> bool
fn try_lock_exclusive(&self) -> bool
Attempts to acquire an exclusive lock without blocking.
source§unsafe fn unlock_exclusive(&self)
unsafe fn unlock_exclusive(&self)
Releases an exclusive lock. Read more
source§fn is_locked_exclusive(&self) -> bool
fn is_locked_exclusive(&self) -> bool
Returns
true
if this RwLock
is currently locked exclusively.Auto Trait Implementations§
impl RefUnwindSafe for RwSpinlock
impl Send for RwSpinlock
impl Sync for RwSpinlock
impl Unpin for RwSpinlock
impl UnwindSafe for RwSpinlock
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more