3 ms·
Personally I wouldn't use async but instead use a pool of worker threads passing messages to an orchestrator thread using channels: https://doc.rust-lang.org/ru
by biorach 3y ago
Personally I wouldn't use async but instead use a pool of worker threads passing messages to an orchestrator thread using channels: https://doc.rust-lang.org/rust-by-example/std_misc/channels.html https://doc.rust-lang.org/rust-by-example/std_misc/channels....
The orchestrator can then keep track of what's going on and avoid duplicating tasks and the workers don't need to worry about any global state.