News for hackers. Stuff that matters.
Re:How to think about `async`/`await` in Rust by pornel on Wednesday July 05, 2023 @08:05AM (#36599190)
Rust explicitly has "Send" and "non-Send" futures that can execute either on any thread, or always on the same thread. Details depend on the executor, and you can roll your own if you want.

This works in Rust:

    let thread_s = spawn(join!(state1(yes), send(message), receive(message2));
    let thread_r = spawn(join!(state1(yes), receive(message), send(message2));

There are no comments on this comment yet.