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

Remove cancel optimization for packageQuery caller #1472

Merged
merged 1 commit into from
Sep 16, 2021

Conversation

sreadingMSFT
Copy link
Contributor

@sreadingMSFT sreadingMSFT commented Sep 15, 2021


There is currently no way to remove the callbacks from the context which means the callbacks can continue to be fired after the cancel has caused the coroutine to return if the coroutine does not wait for the context to finish. This triggers a crash. In the packageManagement case, it always waits for the context to finish, but in the packageQuery case it tried to optimize that away. It would be best to eventually figure out how to bring the quicker cancel back, so I'll file a bug, but for now removing that optimization so that it no longer fails is the first priority. Cancel in the packageQuery case will now also wait until the context is finished. The operation will be marked as status == Cancelled, even though it may have still run to completion (either successfully or with an install\download failure). This is built in behavior for async operations that can't be changed, and already happens for packageManagement callers calling Cancel during the Install phase (which cannot be cancelled).

Microsoft Reviewers: Open in CodeFlow

@sreadingMSFT sreadingMSFT merged commit 7fb08ff into microsoft:master Sep 16, 2021
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

3 participants