From 50b2f04bb2e60f0a545db530626eb57a60c3dfd4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 06:48:43 +0000 Subject: [PATCH 1/4] Initial plan for issue From e98cc843867dcf36951c6a02cd5ef6e275aa554c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 06:53:24 +0000 Subject: [PATCH 2/4] Fix Task.WhenAny documentation typo - change 'result value is true' to 'This is true' Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com> --- xml/System.Threading.Tasks/Task.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Threading.Tasks/Task.xml b/xml/System.Threading.Tasks/Task.xml index cd654e48442..f8455498de0 100644 --- a/xml/System.Threading.Tasks/Task.xml +++ b/xml/System.Threading.Tasks/Task.xml @@ -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. ]]> @@ -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. From 6420cea1324b6013d7df803615c34cf74b232b1e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 07:13:58 +0000 Subject: [PATCH 3/4] Remove backticks around 'true' in Task.WhenAny documentation per review feedback Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com> --- xml/System.Threading.Tasks/Task.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Threading.Tasks/Task.xml b/xml/System.Threading.Tasks/Task.xml index f8455498de0..c02a3a08d0e 100644 --- a/xml/System.Threading.Tasks/Task.xml +++ b/xml/System.Threading.Tasks/Task.xml @@ -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. This 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. ]]> @@ -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. This 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. From 39a1a65c2bdf246de13f8480387d1769aac28067 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Jun 2025 13:46:13 +0000 Subject: [PATCH 4/4] Update Task.WhenAny documentation tense per review feedback Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- xml/System.Threading.Tasks/Task.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Threading.Tasks/Task.xml b/xml/System.Threading.Tasks/Task.xml index c02a3a08d0e..10b24c88906 100644 --- a/xml/System.Threading.Tasks/Task.xml +++ b/xml/System.Threading.Tasks/Task.xml @@ -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. This is true even if the first task to complete ended in the `Canceled` or `Faulted` state. +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. ]]> @@ -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. This is true even if the first task to complete ended in the `Canceled` or `Faulted` state. +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. > [!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.