Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ConfigureAwait(false) #59

Closed
michaelpaulus opened this issue Jul 17, 2018 · 4 comments
Closed

Missing ConfigureAwait(false) #59

michaelpaulus opened this issue Jul 17, 2018 · 4 comments
Labels

Comments

@michaelpaulus
Copy link

It is necessary for any library to always include ConfigureAwait(false) on all async calls. This allows anybody consuming the library to use it synchronously without creating a deadlock. We are in the situation that we cannot use your SDK because it is creating deadlocks in our application. Please add ConfigureAwait(false) to all async calls.

See details here:
https://social.technet.microsoft.com/wiki/contents/articles/23103.c-avoiding-deadlock-in-asyncawait.aspx

@jimmymcpeter
Copy link
Contributor

jimmymcpeter commented Jul 17, 2018

Hi @michaelpaulus, I'd like to get an example of what you're using it for. This may help the team create a test instead of blindly adding ConfigureAwait(false) to everything and running the existing unit tests that all pass. Based on the article I assume you are using the SDK with a GUI or ASP type application?

@michaelpaulus
Copy link
Author

We are using it in both WebApi and WebJobs. Our call chains are complex and we can't make them all async all the way down so we have to run some methods sync. You are actually supposed to blindly add ConfigureAwait(false) to everything as a library author, that is part of the responsibility of writing libraries in c# that use async/await. I've forked the project and added them for myself. It looks like you are actually doing it in most places, but have missed a few.

Thanks.

@jimmymcpeter
Copy link
Contributor

v2.0.5 is now available NuGet with these changes - https://www.nuget.org/packages/Intacct.SDK/2.0.5

@michaelpaulus
Copy link
Author

@jimmymcpeter Thanks for the quick turn around!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants