mpmc-queue 0.1.0

A bounded multi-producer multi-consumer queue using Mutex + Condvar
Documentation
use mpmc_queue::queue::{BoundedQueue, MpmcQueue};

fn main() {
    let q = MpmcQueue::new(2);

    // Blocking API
    q.push(10);
    q.push(20);

    println!("{}", q.pop());
    println!("{}", q.pop());

    // Non-blocking API (this removes warning)
    println!("try_push: {:?}", q.push(30)); // Ok
    println!("try_push: {:?}", q.try_push(40)); // Ok
    println!("try_push: {:?}", q.try_push(50)); // Err (full)

    println!("try_pop: {:?}", q.try_pop()); // Some
    println!("try_pop: {:?}", q.try_pop()); // Some
    println!("try_pop: {:?}", q.try_pop()); // None
}