messaging 1.0.6

A simple two-way messaging crate
Documentation

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)?;