Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven't yet used channels anywhere in Rust, but my frustration with async mutexes is growing stronger. Do you care to show any examples?


async mutexes?

> Contrary to popular belief, it is ok and often preferred to use the ordinary Mutex from the standard library in asynchronous code.

> The feature that the async mutex offers over the blocking mutex is the ability to keep it locked across an .await point.

https://docs.rs/tokio/latest/tokio/sync/struct.Mutex.html




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: