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

Make the UI dispatcher more deadlock safe #5262

Merged

Conversation

MDoerner
Copy link
Contributor

@MDoerner MDoerner commented Nov 3, 2019

This PR changes the behaviour of UiDispatcher.StartTask in case we are already on the UI synchronization context/ In this case, it will perform the requested action immediately and return a completed task. This removes the potential deadlock from creating a new task from the UI thread and then waiting for it.

… on the UI thread

This removes the potential deadlock from creating a new task from the UI thread and then waiting for it. The new return value when we are already ion the UI thread is an already completed task.
@bclothier bclothier merged commit 6804999 into rubberduck-vba:next Nov 3, 2019
@MDoerner MDoerner deleted the MakeUiDispatcherMoreDeadlockSafe branch February 19, 2020 21:08
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

Successfully merging this pull request may close these issues.

None yet

2 participants