Struct maitake::sync::spin::RwSpinlock
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§
§impl ConstInit for RwSpinlock
impl ConstInit for RwSpinlock
§const INIT: RwSpinlock = _
const INIT: RwSpinlock = _
Create a new instance. Read more
§impl Debug for RwSpinlock
impl Debug for RwSpinlock
§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
§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.
§fn try_lock_exclusive(&self) -> bool
fn try_lock_exclusive(&self) -> bool
Attempts to acquire an exclusive lock without blocking.
§unsafe fn unlock_exclusive(&self)
unsafe fn unlock_exclusive(&self)
Releases an exclusive lock. Read more
§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