News for hackers. Stuff that matters.
Re:Common Rust Lifetime Misconceptions by jlffwoymasdf on Monday December 04, 2023 @09:28PM (#38526288)
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.

Re:Common Rust Lifetime Misconceptions by ben-schaaf on Tuesday December 05, 2023 @03:30AM (#38528298)
Doesn't tokio have a single-threaded runtime where that's not needed?
Re:Common Rust Lifetime Misconceptions by zackangelo on Tuesday December 05, 2023 @08:16AM (#38530295)
Yes but Send + Sync is required everywhere regardless.
Re:Common Rust Lifetime Misconceptions by vgatherps on Tuesday December 05, 2023 @10:36AM (#38532207)
This is not true, you can run non-send futures using Tokio: https://docs.rs/tokio/latest/tokio/task/struct.LocalSet.html