blocking on async code

Calling .Result or .Wait() on a task so that a thread sits idle until the async work finishes.

Blocking on tasks can hang or starve a server under load.

In more detail

Under load it starves the thread pool, and where a synchronization context exists it can deadlock outright. Await the task instead, all the way up.

Related terms

Taught in

References