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

Update Task.xml - Minor grammar fixes #11074

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jp41011
Copy link

@jp41011 jp41011 commented Mar 11, 2025

Minor grammar fixes on the Task.WhenAny Method page.

@jp41011 jp41011 requested a review from kouvel as a code owner March 11, 2025 22:23
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Mar 11, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-threading-tasks

Copy link

Learn Build status updates of commit 0793951:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Threading.Tasks/Task.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

Thank you

@@ -7372,7 +7372,7 @@ The returned task will complete when any of the supplied tasks has completed. T
The returned task will complete when any of the supplied tasks has completed. The returned task will always end in the `RanToCompletion` state with its `Result` set to the first task to complete. The result value is `true` even if the first task to complete ended in the `Canceled` or `Faulted` state.

> [!TIP]
> In every overloaded version of Task.WhenAny() when this method returns the first completed task, the other tasks will continue running until completion, even any of them completed in the `Canceled` or `Faulted` state. So, if that behavior is not desired you may want to cancel all the remaining tasks once the first task complete.
> In every overloaded version of Task.WhenAny() when this method returns the first completed task, the other tasks will continue running until completion, even if any of them completed in the `Canceled` or `Faulted` state. If that behavior is not desired you may want to cancel all the remaining tasks once the first task completes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
> In every overloaded version of Task.WhenAny() when this method returns the first completed task, the other tasks will continue running until completion, even if any of them completed in the `Canceled` or `Faulted` state. If that behavior is not desired you may want to cancel all the remaining tasks once the first task completes.
> In every overload of Task.WhenAny(), when the method returns the first completed task, the other tasks will continue running until completion, even if any of them completed in the `Canceled` or `Faulted` state. If that behavior is undesirable, you can cancel all the remaining tasks once the first task completes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Threading.Tasks community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants