-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…o 'This is true' Co-authored-by: jeffhandley <[email protected]>
Copilot finished work on behalf of
jeffhandley
June 19, 2025 06:54
jeffhandley
requested changes
Jun 19, 2025
…ew feedback Co-authored-by: jeffhandley <[email protected]>
Copilot finished work on behalf of
jeffhandley
June 19, 2025 07:14
jeffhandley
approved these changes
Jun 20, 2025
Tagging subscribers to this area: @dotnet/area-system-threading-tasks |
gewarren
approved these changes
Jun 30, 2025
Co-authored-by: gewarren <[email protected]>
auto-merge was automatically disabled
June 30, 2025 13:46
Head branch was pushed to by a user without write access
Copilot finished work on behalf of
gewarren
June 30, 2025 13:46
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a documentation typo in the
Task.WhenAny
method remarks that was causing confusion about the return value.Problem
The documentation incorrectly stated:
This wording is misleading because the result value is not literally
true
- it's the first task to complete. The sentence was trying to convey that the behavior described (setting Result to the first task) is true regardless of the task's completion state.Solution
Changed the wording to:
This clarifies that the statement refers to the behavior being true, not the result value being the boolean
true
.Changes Made
WhenAny(Task task1, Task task2)
methodWhenAny<TResult>(Task<TResult> task1, Task<TResult> task2)
method/xml/System.Threading.Tasks/Task.xml
The fix makes the documentation consistent with other
WhenAny
overloads that already use the correct wording.Fixes #11350.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.