Struct mioco::sync::RwLock [] [src]

pub struct RwLock<T: ?Sized> { /* fields omitted */ }

A reader-writer lock

Based on std::sync::RwLock. Calls mioco::yield_now() on contention.

Works both inside and outside of mioco.

Methods

impl<T> RwLock<T>
[src]

Creates a new instance of an RwLock which is unlocked.

impl<T: ?Sized> RwLock<T>
[src]

Get a reference to raw std::sync::RwLock.

Use it to perform operations outside of mioco coroutines.

Locks this rwlock with shared read access, blocking the current coroutine until it can be acquired.

Attempts to acquire this rwlock with shared read access.

Locks this rwlock with exclusive write access, blocking the current coroutine until it can be acquired.

Attempts to lock this rwlock with exclusive write access.

Determines whether the lock is poisoned.

Trait Implementations

impl<T: Debug + ?Sized> Debug for RwLock<T>
[src]

Formats the value using the given formatter.