asyncawaaait
Joined 6 years ago
Karma
12
Submissions
4
Member since
Nov 10
Joined 6 years ago
Threads have their own resource cost.
In my experience, the complexity is vastly reduced by not having to implement tricky asynchronous APIs (Task Paralell, thread pools, BackgroundWorker, etc).
Synchronous code locks you into the model of handling one request per thread.
Given the minor overhead (both cognitive and runtime) of a sync/await, I can’t see why you wouldn’t want to do it here.
Using a good IDE (Rider or Visual Studio), debugging async/await code works as expected.
Are you doing interop or calling unmanaged code?