messaging

Crates.iomessaging
lib.rsmessaging
version1.0.6
sourcesrc
created_at2024-01-22 20:30:24.249991
updated_at2024-01-22 21:13:33.085439
descriptionA simple two-way messaging crate
homepage
repositoryhttps://github.com/GTLugo/messaging
max_upload_size
id1109151
size17,579
Gabriel Lugo (GTLugo)

documentation

README

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)?;
Commit count: 0

cargo fmt