#mutex #arc #macro

arcmutex

A convenience library for working with Arc<Mutex<T>>s

3 unstable releases

Uses old Rust 2015

0.2.0 Dec 18, 2015
0.1.1 Mar 28, 2015
0.1.0 Mar 28, 2015

#110 in #arc

24 downloads per month

MIT license

2KB

ArcMutex

A rust library for making creating Arc<Mutex<T>>s more convenient.
Defines the ArcMutex<T> type alias and the arcmutex( expr) function.

Contributions welcome! :)

Author: Kurotetsuka
License: MIT

Example

extern crate arcmutex;
use arcmutex::{ arcmutex, ArcMutex};

let a : ArcMutex<u8> = arcmutex( 0);
let mut b = a.lock().unwrap();
*b += 1;
println!( "a: {}", *b);

No runtime deps