StephenCleary / AsyncEx

A helper library for async/await.
MIT License
3.49k stars 358 forks source link

Contradiction? #262

Closed Korporal closed 2 years ago

Korporal commented 2 years ago

How you reconcile what you advise here in your blog with this method in your code?

StephenCleary commented 2 years ago

I don't ever recommend blocking on asynchronous code. Sometimes it's unavoidable. And when it's unavoidable, you want to do it the right way.

So, this library includes extension methods to block on tasks. However, they're hidden underneath a Synchronous sub-namespace that you have to opt into in order to see them.