On Tue, Dec 31, 2013 at 1:50 PM, Carter Schonwald < carter.schonw...@gmail.com> wrote:
> what are some candidate data structures in that case? i'm happy to try and > hack out some prototypes for that. > Can I talk about the counterpoint? What if we want to accept and handle bounds to the messaging system? What data structure could we use for a system which is willing to accept this constraint? A particularly interesting data structure for this case is the RingBuffer implemented as part of Disruptor: http://mechanitis.blogspot.com/2011/06/dissecting-disruptor-whats-so-special.html In this setup, we have a single fixed-sized buffer which represents the total number of messages in flight throughout the entire system (at least if we're trying to emulate CSP atop Disruptor. This is something we've played around with in Celluloid). This RingBuffer is implemented as a lock-free/wait-free data structure which is specifically designed to be cache-friendly (i.e. false sharing is specifically avoided). On Tue, Dec 31, 2013 at 1:33 PM, Nathan Myers <n...@cantrip.org> wrote: > It's clear there are people who *want* both kinds of channels. It > does not follow that they should both be first-class primitives. Crazy idea: push channels out of the standard library ala libgreen/libnative, and provide a trait for channel-alikes. Come up with a least common denominator protocol, and ensure all channel-alikes support it. -- Tony Arcieri
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev