Skip to content

Fix Task.WhenAny documentation typo: change "result value is true" to "This is true" #11477

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xml/System.Threading.Tasks/Task.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7092,7 +7092,7 @@ An exception was thrown during

## Remarks

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.
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. This is true even if the first task to complete ended in the `Canceled` or `Faulted` state.

]]></format>
</remarks>
Expand Down Expand Up @@ -7359,7 +7359,7 @@ The returned task will complete when any of the supplied tasks has completed. T

## Remarks

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.
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. This is true even if the first task to complete ended in the `Canceled` or `Faulted` state.

> [!TIP]
> 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.
Expand Down
Loading