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

Implement ConfigureAwait(false) #240

Open
hallidev opened this issue Jun 18, 2020 · 0 comments
Open

Implement ConfigureAwait(false) #240

hallidev opened this issue Jun 18, 2020 · 0 comments

Comments

@hallidev
Copy link

I'm working in a fairly large codebase that's using this dreaded pattern:

string result = response.Content.ReadAsStringAsync().Result;

As a result, line 67 in InOrderAsyncQueueDispatcher.cs reliably deadlocks :

_eventSlim.Wait(_cancellationTokenSource.Token);

I've added ConfigureAwait(false) to a few key code paths for my use case and it resolves the issue. This should be done throughout the solution.

I can put together a PR if you like. I just wanted to know if you were okay with that / in agreement.

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

No branches or pull requests

1 participant