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

Wait for Discovery to initialize before Cancelling it #5177

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented Aug 12, 2024

Description

Because discovery intialization takes time until the populates the _currentDiscoveryRequest, and any call to CancelDiscovery in the meantime would just return, we block until the request is populated, and then cancel. This is workaround for race condition that happens when you issue Discovery and DiscoveryCancel quickly in succession.

Related issue

Fix https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1579525

Copy link
Contributor

@MarcoRossignoli MarcoRossignoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if we can have a test but looks complex, I got the idea

@nohwnd
Copy link
Member Author

nohwnd commented Aug 13, 2024

I tested it via vstest console wrapper so test is possible, but it is quite flaky, so I would rather avoid it.

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.

2 participants