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

Prevent going through UI thread pending queue twice #807

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

lifengl
Copy link
Member

@lifengl lifengl commented Mar 18, 2021

Instead of doing another Task.Yield(), just use existing built-in function to ensure it happens once.

The primary goal is to prevent going through the UI thread dispatch queue twice. The VS file watcher is especially busy to send lots of requests, which are often blocked due to some are on the UI thread. This one is just to reduce unnecessary task yield during that code path.

@lifengl lifengl requested a review from AArnott March 18, 2021 18:51
@AArnott AArnott changed the title Prevent going through UI thread pending queue twice. Prevent going through UI thread pending queue twice Mar 18, 2021
@lifengl lifengl merged commit f116ea0 into main Mar 18, 2021
@lifengl lifengl deleted the dev/lifengl/preventMainThreadQueueTwice branch March 18, 2021 22:07
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.

4 participants