On Tue, 2013-12-24 at 18:48 -0800, Patrick Walton wrote: > Haskell may be a nice thing to look at here: the unbounded channel is > the primitive, and bounded channels are built on top of unbounded ones > using an `MVar` to rate limit. Such a thing could be easily built in > Rust using a channel paired with an `AtomicUint`.
Arguably the MVar as a bounded channel of fixed capacity 1 is the primitive (both taking from and putting into an MVar will block if it is empty or full, respectively), and unbounded Chans are just MVars all the way down. But I'm not sure if that's not just nitpicking. ;) -benh _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev