7 releases (stable)

1.0.6 Jan 22, 2024
0.1.0 Jan 22, 2024

#588 in Data structures

MIT/Apache

7KB

A simple two-way messaging crate

ko-fi

Good for use cases such as communication across two threads.

let (renderer_mailbox, game_mailbox) = Mailbox::new_entangled_pair();

renderer_mailbox.send(RenderLoopMessage::SyncWithGame);
if let Ok(RenderLoopMessage::SyncWithGame) = game_mailbox.poll() {
    // ...
}

game_mailbox.send_and_wait(GameLoopMessage::SyncWithRender)?;

Dependencies

~260–720KB
~17K SLoC