Struct cryo::SyncLock [−][src]
pub struct SyncLock { /* fields omitted */ }
std
only.An implementation of Lock
that uses the synchronization facility
provided by ::std
. Lock operations are tied to the creator thread, but
unlock operations can be done in any threads. Blocks the current thread on
borrow failure.
The implementation of SyncLock
was verified using SPIN.
Trait Implementations
impl Lock for SyncLock
[src]
impl Lock for SyncLock
[src]type LockMarker = NoSendMarker
type LockMarker = NoSendMarker
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