glucaci / mongodb-quartz-net

MongoDB Job Store for Quartz.NET
MIT License
51 stars 41 forks source link

Add ConfigureAwait(false) to all asynchronous methods #19

Closed realLiangshiwei closed 4 years ago

realLiangshiwei commented 4 years ago

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,

chrisdrobison commented 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?

chrisdrobison commented 4 years ago

I don’t want to bring in the Fody dependency.

realLiangshiwei commented 4 years ago

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.

chrisdrobison commented 4 years ago

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.

realLiangshiwei commented 4 years ago

However , choose is your's.