Closed realLiangshiwei closed 4 years ago
What is the purpose of this change? There don’t appear to be any code changes. If there is a deadlock, why not just fix the code where the dead lock is?
I don’t want to bring in the Fody dependency.
Like quartz's code, need to call ConfigureAwait(false)
in all codes that use asynchronous methods.
Fody can help you configure at a global level. If you don't want to configure it globally, you can also write it manually.
I would prefer we just fix the missing instances in code. Also, is this code that is eventually run on .Net Framework because that is the only runtime where ConfigureAwait(false) actually has any effect.
However , choose is your's.
Related : https://github.com/abpframework/abp/issues/4800
Should not require the same context, this will deadlock. I used https://github.com/Fody/ConfigureAwait to configure async code's ConfigureAwait at a global level,