[][src]Macro sugars::rwlock

macro_rules! rwlock {
    ($e:expr) => { ... };
    ($e:expr,) => { ... };
    ($($e:expr),+ $(,)?) => { ... };
}

Create a new RwLock.

It is also able to create tuples if given more than one parameter.

Example

use std::sync::RwLock;
use sugars::rwlock;
let rwlk = rwlock!(String::new());
let mut read = rwlk.read().unwrap();
println!("{}", read);