Hacker News new | ask | show | jobs
by Cyph0n 300 days ago
You can use a async-aware mutex if you require it to be held across await points. For example, if using the Tokio runtime: https://docs.rs/tokio/latest/tokio/sync/struct.Mutex.html.