Skip to content

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.

@nohwnd nohwnd merged commit 80af388 into microsoft:main Aug 13, 2024
This was referenced Jul 21, 2025
This was referenced Sep 28, 2025
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