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

SynchronizationContext and blocking calls #1078

Merged
merged 46 commits into from
Dec 11, 2019
Merged

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Dec 5, 2019

Pull Request Template

Description

In scenarios where there is a SynchronizationContext (Windows Forms, ASP.NET on .NET Framework) and the SDK is used in a blocking way (through ConfigureAwait(false).GetAwaiter().GetResult()), the operation needs to be launched through a Task.Run to avoid a deadlock on the SynchronizationContext.

This PR creates Inline versions of: ContainerCore, UserCore, DatabaseCore, PermissionCore, ConflictsCore, ScriptsCore that wrap calls in a new TaskHelper to detect the need of Task.Run.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Closing issues

Closes #1043

@ealsur ealsur added the bug Something isn't working label Dec 5, 2019
@ealsur ealsur self-assigned this Dec 5, 2019
j82w
j82w previously approved these changes Dec 5, 2019
kirankumarkolli
kirankumarkolli previously approved these changes Dec 9, 2019
@j82w j82w merged commit 232e180 into master Dec 11, 2019
@j82w j82w deleted the users/ealsur/synchcontext branch December 11, 2019 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Queries with sync-over-async hang
3 participants