Hacker News new | ask | show | jobs
by biorach 1013 days 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....

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.