Skip to content

Commit fd1ea3c

Browse files
authored
Update Task.xml (dotnet#8608)
1 parent 7292c70 commit fd1ea3c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

xml/System.Threading.Tasks/Task.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6234,6 +6234,9 @@ The returned task will complete when any of the supplied tasks has completed. T
62346234
62356235
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.
62366236
6237+
> [!TIP]
6238+
> 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.
6239+
62376240
]]></format>
62386241
</remarks>
62396242
<exception cref="T:System.ArgumentNullException">

0 commit comments

Comments
 (0)