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

Preserve synchronization context in SaveChangesAsync for accepting changes #23971

Closed
roji opened this issue Jan 25, 2021 · 1 comment · Fixed by #23988
Closed

Preserve synchronization context in SaveChangesAsync for accepting changes #23971

roji opened this issue Jan 25, 2021 · 1 comment · Fixed by #23988
Assignees
Labels
area-save-changes closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@roji
Copy link
Member

roji commented Jan 25, 2021

Since #10164, we have ConfigureAwait(false) everywhere; this can cause issues in certain data binding scenarios, when accepting changes triggers a UI change, which is no longer executed on the UI thread (e.g. #22841).

We could specifically use ConfigureAwait(true) in the code path leading to AcceptAllChanges (specifically in two places: DbContext.SaveChangesAsync, StateManager.SaveChangesAsync).

@ajcvickers ajcvickers added this to the 6.0.0 milestone Jan 26, 2021
@roji roji changed the title Consider doing ConfigureAwait(true) in SaveChangesAsync Preserve synchronization context in SaveChangesAsync for accepting changes Jan 26, 2021
roji added a commit that referenced this issue Jan 26, 2021
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jan 26, 2021
roji added a commit that referenced this issue Jan 26, 2021
@ajcvickers ajcvickers modified the milestones: 6.0.0, 6.0.0-preview1 Jan 27, 2021
@ajcvickers
Copy link
Member

Looks like this didn't make it into the preview 1 branch. It was merged after preview 1 branched, but before branding was updated to preview 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-save-changes closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants