door_player 0.3.20

Door Player, Cross by ffmpeg and egui
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use ringbuf::{
    HeapRb,
    traits::{Consumer, Producer, Split},
};
#[test]
fn ring_buf_test() {
    let rb = HeapRb::<i32>::new(2);
    let (mut prod, mut cons) = rb.split();
    let th = std::thread::spawn(move || prod.push_slice(&[2, 3]));
    let _ = th.join();
    let t = cons.try_pop();
    if let Some(t) = t {
        println!("{}", t);
    }
}