Skip to content

Commit 7f1d3c5

Browse files
authored
Fix Task.WhenAny documentation typo: change "result value is true" to "This is true" (#11477)
1 parent c5eea03 commit 7f1d3c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.Threading.Tasks/Task.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7093,7 +7093,7 @@ An exception was thrown during
70937093

70947094
## Remarks
70957095

7096-
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.
7096+
The returned task completes when any of the supplied tasks has completed. The returned task always ends 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.
70977097

70987098
]]></format>
70997099
</remarks>
@@ -7360,7 +7360,7 @@ The returned task will complete when any of the supplied tasks has completed. T
73607360

73617361
## Remarks
73627362

7363-
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.
7363+
The returned task completes when any of the supplied tasks has completed. The returned task always ends 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.
73647364

73657365
> [!TIP]
73667366
> 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.

0 commit comments

Comments
 (0)