ipc-ring48 1.0.1

A bounded 48-byte POSIX shared-memory SPSC queue for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use ipc_ring48::Consumer;

fn main() -> std::io::Result<()> {
    let consumer = Consumer::open()?;

    if let Some(message) = consumer.pop() {
        let text = message
            .iter()
            .copied()
            .take_while(|byte| *byte != 0)
            .map(char::from)
            .collect::<String>();

        println!("{text}");
    }

    Ok(())
}