ConfigureAwait(false) relevant in ASP.NET Core?

前端 未结 2 1584
臣服心动
臣服心动 2020-11-28 05:28

I stumbled on an issue (https://github.com/HTBox/allReady/issues/1313) at GitHub where they discussed about taking the ConfigureAwait(false) out of the code, cl

2条回答
  •  青春惊慌失措
    2020-11-28 06:01

    ConfigureAwait only has effects on code running in the context of a SynchronizationContext which ASP.NET Core doesn't have (ASP.NET "Legacy" does).

    General purpose code should still use it because it might be running with a SynchronizationContext.

    ASP.NET Core SynchronizationContext

提交回复
热议问题