Function sync::spsc_queue::queueExperimental
[-]
[+]
[src]
pub fn queue<T: Send>(bound: uint) -> (Consumer<T>, Producer<T>)
Creates a new queue with a consumer-producer pair.
The producer returned is connected to the consumer to push all data to the consumer.
Arguments
bound- This queue implementation is implemented with a linked list, and this means that a push is always a malloc. In order to amortize this cost, an internal cache of nodes is maintained to prevent a malloc from always being necessary. This bound is the limit on the size of the cache (if desired). If the value is 0, then the cache has no bound. Otherwise, the cache will never grow larger thanbound(although the queue itself could be much larger.