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

Ensure tasks are resolved when run from extension host #101904

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

alexr00
Copy link
Member

@alexr00 alexr00 commented Jul 8, 2020

Fixes #101884

@alexr00
Copy link
Member Author

alexr00 commented Jul 8, 2020

This issue was caused by 1abf21d.
1abf21d fixed some timing issues with running tasks from the extension host by making an extra trip from the extension host to main to get the task execution, essentially splitting mainThreadTasks $executeTask into $getTaskExecution (called first) and $executeTask (called second).

This split is what caused #101884. When a task execution is made, the task is effectively resolved. So, in the old way with just $executeTask, the task was resolved and then immediately run. Now, the task is resolved, passed to the extension host where it loses some important stuff (like the depends on info), passed back to the main thread, then executed. There needs to be another resolve in there before it is run, so that it can pick up the missing depends on info again.

In short, I have changed the one place where a TaskHandleDTO is passed into $executeTask to pass that again, and I have changed $executeTask back to it's pre-timing fix behavior. This still preserves the timing fixes, since $getTaskExecution is still being called first. The changes to $executeTask that caused this issue were not to fix the timing problems, but instead to increase performance by not resolving the task again. $executeTask and $getTaskExecution should look very similar, with $executeTask performing the additional run.

@alexr00 alexr00 merged commit d5e9aa0 into release/1.47 Jul 8, 2020
@alexr00 alexr00 deleted the alexr00/issue#101884 branch July 8, 2020 08:51
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants