Skip to content

Conversation

@Tyrrrz
Copy link
Owner

@Tyrrrz Tyrrrz commented Nov 27, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 27, 2025 13:39
@Tyrrrz Tyrrrz added the enhancement New feature or request label Nov 27, 2025
Copilot finished reviewing on behalf of Tyrrrz November 27, 2025 13:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a polyfill for the Task.WhenEach(...) method introduced in .NET 9.0, enabling developers to iterate over tasks as they complete using async enumeration. The implementation provides both generic and non-generic variants, with support for cancellation tokens.

Key changes:

  • Polyfill implementation for Task.WhenEach() with four method overloads (generic and non-generic, params array and IEnumerable)
  • Comprehensive test coverage demonstrating the async enumeration behavior
  • Updated documentation to reflect the new polyfilled signatures

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
PolyShim/Signatures.md Updated member counts and added documentation links for the four new Task.WhenEach overloads
PolyShim/Net90/Task.cs New polyfill implementation providing async enumerable iteration over completing tasks, conditionally compiled for platforms before .NET 9.0 that support async interfaces
PolyShim.Tests/Net90/TaskTests.cs Added test cases verifying correct task completion ordering for both generic and non-generic variants

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot finished reviewing on behalf of Tyrrrz November 27, 2025 13:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

PolyShim/Signatures.md:277

  • The documented signature includes a CancellationToken parameter, but the actual implementation in PolyShim/Net90/Task.cs does not include this overload. Either the implementation should be added or this line should be corrected to match the actual signature: IAsyncEnumerable<Task<T>> WhenEach(IEnumerable<Task<T>>)
  - [`Task<T?> FromResult<T>(T?)`](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task.fromresult) <sup><sub>.NET Core 1.0</sub></sup>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tyrrrz Tyrrrz requested a review from Copilot November 27, 2025 13:54
Copilot finished reviewing on behalf of Tyrrrz November 27, 2025 13:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants