On 12/18/2013 09:36 PM, Patrick Walton wrote:
On 12/18/13 8:48 PM, Kevin Ballard wrote:
By that logic, you'd want to drop the oldest unprocessed events, not
the newest.
Dropping is dropping. If you prefer to drop old events, pull them off
the channel and drop them fast enough that new events don't spill.
To reiterate, there is a meta-point here: Blessing any communications
primitive as the One True Primitive never goes well for high-performance
code. I think we need multiple choices. The hard decision is what should
be the default.
It helps to consider what serves as a useful building block. An
unbounded channel is useless as the basis for a bounded channel.
You can easily code an unbounded channel that implements precisely
the storage-management and ultimate-failure policies that suit
you. A primitive can't choose correctly, or even enable you to
express your choices without arbitrary limitations or vexing
complexity.
Nathan Myers
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev