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

Why are you using these? #1

Open
markjbrown opened this issue Oct 31, 2021 · 0 comments
Open

Why are you using these? #1

markjbrown opened this issue Oct 31, 2021 · 0 comments

Comments

@markjbrown
Copy link

Why are you using GetAwaiter().GetResult() in all of your code instead of just making the functions async?

In case you don't know, in C#, you should always aim to work with async/await when you have Tasks. If you are using ".GetAwaiter ().GetResult ()", ".Result" or ".Wait ()" to get the result of a task or to wait for the task completion you may experience deadlocks or thread pool starvation.

You use them everywhere. This is not how the Cosmos DB should be used.

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