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

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 Winter 2026 batch! Applications are open till Nov 10

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

Search: