async and awaitbeginner
Calling .Result on a task blocks a thread that could have served another request, and under load that is the deadlock everyone has a story about — await is how you wait without holding anything up.
.Result, async void and Thread.Sleep in one method. Undo all three.
Nothing blocks, nothing is fire-and-forget, and the work is cancellable.
Published in full, before you start — every point is one of these and there is nothing else.
Calling .Result on a task blocks a thread that could have served another request, and under load that is the deadlock everyone has a story about — await is how you wait without holding anything up.