Struct cryo::AtomicLock [−][src]
pub struct AtomicLock { /* fields omitted */ }
This is supported on crate feature
atomic
only.An implementation of Lock
that uses atomic operations. Panics on borrow
failure.
Trait Implementations
impl Debug for AtomicLock
[src]
impl Debug for AtomicLock
[src]impl Lock for AtomicLock
[src]
impl Lock for AtomicLock
[src]type LockMarker = SendMarker
type LockMarker = SendMarker
The Send
-ness of this type indicates whether a lock can only be
acquired by the same thread as self
’s creator. Read more
type UnlockMarker = SendMarker
type UnlockMarker = SendMarker
The Send
-ness of this type indicates whether a lock can only be
released by the same thread as the one that acquired it. Read more
fn new() -> Self
[src]
unsafe fn lock_shared(&self)
[src]
unsafe fn lock_shared(&self)
[src]Acquire a shared lock, blocking the current thread until the lock is acquired. Read more
unsafe fn try_lock_shared(&self) -> bool
[src]
unsafe fn try_lock_shared(&self) -> bool
[src]Acquire a shared lock. Read more
unsafe fn unlock_shared(&self)
[src]
unsafe fn unlock_shared(&self)
[src]Release a shared lock. Read more
unsafe fn lock_exclusive(&self)
[src]
unsafe fn lock_exclusive(&self)
[src]Acquire an exclusive lock, blocking the current thread until the lock is acquired. Read more
unsafe fn try_lock_exclusive(&self) -> bool
[src]
unsafe fn try_lock_exclusive(&self) -> bool
[src]Acquire an exclusive lock. Read more
unsafe fn unlock_exclusive(&self)
[src]
unsafe fn unlock_exclusive(&self)
[src]Release an exclusive lock. Read more