ExchangeSharp: Async not used correctly

Hey, I am the main dev of https://github.com/btcpayserver/btcpayserver a self hosted payment server which run your own node and support multiple shitcoin on top of bitcoin.

I want to use your API to provide “auto dumping” feature to merchants.

However, it seems that you are using async incorrectly by wrapping sync call with Task.Run.

What you should do is the reverse, using async/await all along the way and use YourMethodAsync().GetAwaiter().GetResult() to make synchronous calls methods.

If I propose a PR fixing all of this, will you merge?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 33 (2 by maintainers)

Most upvoted comments

Replacing my cpu cooler. Pump died after 4 months 😦 Will make a package tomorrow!

– Jeff

On Thu, Apr 19, 2018 at 9:15 PM, Nicolas Dorier notifications@github.com wrote:

You made a new nuget package?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jjxtra/ExchangeSharp/issues/93#issuecomment-382958609, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNoGA1KjDObbQ8cIAAQjCBHjqNPYbnjks5tqVLPgaJpZM4TMs9P .