DEV Community

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

savbace profile image

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).
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.