Skip to content

Use CancellationTokenSource instead of casting dummy objects#3442

Merged
robertbrignull merged 1 commit intomainfrom
robertbrignull/cancellationTokenSource
Mar 6, 2024
Merged

Use CancellationTokenSource instead of casting dummy objects#3442
robertbrignull merged 1 commit intomainfrom
robertbrignull/cancellationTokenSource

Conversation

@robertbrignull
Copy link
Copy Markdown
Contributor

In a few cases in the tests we need either a CancellationToken or CancellationTokenSource and we're building a minimal object and then forcibly casting it to the right type. Using CancellationTokenSource is not hard so I see no reason we shouldn't use the real class in all of these cases.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@robertbrignull robertbrignull requested a review from a team March 6, 2024 12:37
@robertbrignull robertbrignull requested a review from a team as a code owner March 6, 2024 12:37
@robertbrignull robertbrignull merged commit 4a662ea into main Mar 6, 2024
@robertbrignull robertbrignull deleted the robertbrignull/cancellationTokenSource branch March 6, 2024 16:19
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