I am trying to understand the behavior ConfigureAwait(false)
in ASP.NET. In particular, if I am not the await
result. An example of what I mean:
var result = DoSomethingAsync().ConfigureAwait(false);
// do some things other things here. Is our task executing simultaneously?
await result;
From what I read, in the context of ASP.NET (not the kernel), I understand that:
ConfigureAwait(false)
will prevent context re-creation when returning to the application stream. If not specified, the context can be restored to another stream in the original.ConfigureAwait(false)
will use the default thread pool scheduler and AspNetSynchronizationContext
will no longer be used.- In ASP.NET (not the kernel)
AspNetSynchronizationContext
, it ensures that all tasks will be executed sequentially (not in parallel), but each task can be executed in a different thread. - , ASP.NET, . -.
, , , , ? , , . , ASP.NET, ?
, ? AspNetSynchronizationContext
ConfigureAwait(false)
, ?
UPDATE:
"" . , " ". , , . . . ASP.NET . https://msdn.microsoft.com/en-us/magazine/gg598924.aspx
, ConfigureAwait (false) ASP.NET ( ), ( ) ?
- ?
2:
:
ASP.NET Classic ConfigureAwait (false) ?