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

Pass along cancellation token in snippets #73071

Merged
merged 1 commit into from Apr 18, 2024

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Apr 17, 2024

Thread through a cancellation token from a callee parameter instead of silently ignoring it.

Note that this will not have any product impact on cancellation in snippets, since a caller further up the chain still hard-codes CancellationToken.None.

int IVsExpansionFunction.GetDefaultValue(out string bstrValue, [ComAliasName("Microsoft.VisualStudio.OLE.Interop.BOOL")] out int fHasDefaultValue)
=> GetDefaultValue(CancellationToken.None, out bstrValue, out fHasDefaultValue);
int IVsExpansionFunction.GetCurrentValue(out string bstrValue, out int fHasCurrentValue)
=> GetCurrentValue(CancellationToken.None, out bstrValue, out fHasCurrentValue);

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner April 17, 2024 19:02
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 17, 2024
@CyrusNajmabadi
Copy link
Member Author

@akhera99 @sharwell ptal.

Copy link
Member

@sharwell sharwell left a comment

Choose a reason for hiding this comment

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

Approving as cleaner code, but edited the initial comment to call out that this won't have any impact on runtime scenarios without additional changes.

@CyrusNajmabadi CyrusNajmabadi merged commit e465daf into dotnet:main Apr 18, 2024
25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Apr 18, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the snippetCancellation branch April 18, 2024 18:57
@dibarbet dibarbet modified the milestones: Next, 17.11 P1 Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants