Some people: "Eww, #Async #Rust is so complicated! I have to use `block_on` when I want to wrap async in sync!? Come on!"
C#: 😳 😶🌫️
Synchronous wrappers for #asynchronous methods:
https://learn.microsoft.com/en-us/dotnet/standard/asynchronous-programming-patterns/synchronous-wrappers-for-asynchronous-methods
"This "sync-over-async" pattern can seem straightforward, but it's a common source of deadlocks and performance problems."
The gist is: in C#, it can _deadlock_ in a lot of different scenarios:
- when you are in a single-threaded context
- after thread pool exhaustion
1/?
@janriemer Am I stupid or is this sync-over-async literally how 99% of software is written in every single language that supports async? 🧐