←back to thread

517 points bkolobara | 1 comments | | HN request time: 0s | source
Show context
dvt ◴[] No.45043355[source]
Using sync locks in an async environment is a code smell, so the Rust code is bad right off the bat. Just stick with async locks and take the tiny performance hit unless you know exactly what you're doing.
replies(2): >>45043377 #>>45052531 #
ozgrakkurt ◴[] No.45043377[source]
If I remember correctly tokio Mutex docs mentions you should use std Mutex unless you are holding the lock across an await
replies(2): >>45043572 #>>45044581 #
1. ◴[] No.45043572[source]