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 a few #if that are no longer needed #4138

Merged
merged 1 commit into from
Jun 28, 2023
Merged

Remove a few #if that are no longer needed #4138

merged 1 commit into from
Jun 28, 2023

Conversation

geeknoid
Copy link
Member

@geeknoid geeknoid commented Jun 28, 2023

Fixes #4001

Microsoft Reviewers: Open in CodeFlow

@ghost ghost assigned geeknoid Jun 28, 2023
#else
w.TaskSource.TrySetCanceled();
#endif
_ = w.TaskSource.TrySetCanceled(cancellationToken);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we await this? This is testing code, and discarding a task will ignore potential exceptions in TrySetCanceled.

Copy link
Member Author

Choose a reason for hiding this comment

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

Wait for what? TrySetCanceled returns a boolean. And this is intentionally fire-and-forget so we don't care about the return value.

@geeknoid geeknoid merged commit c7c68b3 into main Jun 28, 2023
@geeknoid geeknoid deleted the geeknoid/preproc branch June 28, 2023 21:21
@ghost ghost added this to the 8.0 Preview7 milestone Jun 28, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cleanup #if NETxxx use
2 participants