Trait concurrency_traits::rw_lock::RawTryRwLock[][src]

pub unsafe trait RawTryRwLock {
    fn try_add_reader(&self) -> bool;
fn try_add_writer(&self) -> bool;
unsafe fn remove_reader(&self);
unsafe fn remove_writer(&self); }
Expand description

A raw try rw lock that stores no data

Required methods

fn try_add_reader(&self) -> bool[src]

Tries to add a reader to the lock. Returns true if successful.

fn try_add_writer(&self) -> bool[src]

Tries to add a writer to the lock. Returns true if successful.

unsafe fn remove_reader(&self)[src]

Removes a reader from this lock.

Safety

Caller must ensure that this lock had a reader that was not removed

unsafe fn remove_writer(&self)[src]

Removes a writer from this lock

Safety

Caller must ensure that this lock had a writer that was not removed

Implementors

impl RawTryRwLock for RawAtomicRwLock[src]

fn try_add_reader(&self) -> bool[src]

fn try_add_writer(&self) -> bool[src]

unsafe fn remove_reader(&self)[src]

unsafe fn remove_writer(&self)[src]

impl<CS> RawTryRwLock for RawSpinRwLock<CS>[src]

fn try_add_reader(&self) -> bool[src]

fn try_add_writer(&self) -> bool[src]

unsafe fn remove_reader(&self)[src]

unsafe fn remove_writer(&self)[src]