A simple two-way messaging crate
Good for use cases such as communication across two threads.
let = new_entangled_pair;
renderer_mailbox.send;
if let Ok = game_mailbox.poll
game_mailbox.send_and_wait?;
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)?;