DEV Community

Discussion on: Interview question: async & await (C#)

Collapse
 
savbace profile image
savbace

Re ConfigureAwait(false):

By default, after the awaited task is completed, the execution continues on the originally captured context, i.e. the same thread that invoked the method.

This is not completely true (at least for ASP.NET but excluding Core version). stackoverflow.com/a/13494570/1276058
Continuation is not guaranteed to be executed in the same thread but it rather will be executed by a thread with the same context.

However, the statement is true for UI apps because of a single UI thread.