mrsc
mpsc with requests. This is a basic building block based on rusts mpsc if you have multiple workers that need to execute transactions on a shared state, without having to share your state struct across all threads. Beware that transactions are blocking, so it's recommended to avoid expensive code in the transaction handler.
Installation
Add this to your Cargo.toml
dependency list:
[]
= "0.3"
Add this to your crate root:
extern crate msrc
Example
use mrsc;
use thread;
let server: Server = new;
let channel = server.pop;
spawn;
let response = channel.req.unwrap;
let reply = response.recv.unwrap;
println!;
License
MIT