Re:How to think about `async`/`await` in Rust
by gpderetta on Wednesday July 05, 2023 @05:03AM
(#36597708)
> Threads [...] are interfaces for parallel programming
Threads are both for parallelism and for concurrency. Threads have been used for decades on machines without hardware parallelism.
> are you telling me you never write a mutex or implement locking logic
aside from the fact that mutexes vs futures is completely orthogonal to async vs threads, I definitely prefer dealing with mutexes. 99% of mutex usage is trivial and deadlocks are relatively easy to debug. The issue with locks is their performance implicaitons.
Threads are both for parallelism and for concurrency. Threads have been used for decades on machines without hardware parallelism.
> are you telling me you never write a mutex or implement locking logic
aside from the fact that mutexes vs futures is completely orthogonal to async vs threads, I definitely prefer dealing with mutexes. 99% of mutex usage is trivial and deadlocks are relatively easy to debug. The issue with locks is their performance implicaitons.