Crates.io | arcmutex |
lib.rs | arcmutex |
version | 0.2.0 |
source | src |
created_at | 2015-03-28 03:41:00.165372 |
updated_at | 2015-12-18 19:19:21.343261 |
description | A convenience library for working with `Arc |
homepage | https://github.com/kurotetsuka/arcmutex |
repository | https://github.com/kurotetsuka/arcmutex |
max_upload_size | |
id | 1728 |
size | 2,875 |
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
extern crate arcmutex;
use arcmutex::{ arcmutex, ArcMutex};
let a : ArcMutex<u8> = arcmutex( 0);
let mut b = a.lock().unwrap();
*b += 1;
println!( "a: {}", *b);