Comment on Common Rust Lifetime Misconceptions (2020)parentComments−jlffwoymasdf2ytokio is so wide spread now such that Arc<Mutex<T>> is coincidentally the right choice.I'm not saying that's a good thing.−ben-schaaf2yDoesn't tokio have a single-threaded runtime where that's not needed?−zackangelo2yYes but Send + Sync is required everywhere regardless.−vgatherps2yThis is not true, you can run non-send futures using Tokio: https://docs.rs/tokio/latest/tokio/task/struct.LocalSet.html
Comments
tokio is so wide spread now such that Arc<Mutex<T>> is coincidentally the right choice.
I'm not saying that's a good thing.
Doesn't tokio have a single-threaded runtime where that's not needed?
Yes but Send + Sync is required everywhere regardless.
This is not true, you can run non-send futures using Tokio: https://docs.rs/tokio/latest/tokio/task/struct.LocalSet.html