-
-
Notifications
You must be signed in to change notification settings - Fork 4
Add polyfills for Parallel.ForAsync(...) and Parallel.ForEachAsync(...)
#63
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
Conversation
Parallel.ForAsync(...) and Parallel.ForEachAsync(...)Parallel.ForAsync(...) and Parallel.ForEachAsync(...)
There was a problem hiding this 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 polyfills for Parallel.ForAsync(...) and Parallel.ForEachAsync(...) methods that are available in .NET 6.0+ and .NET 8.0+ respectively, making them available to earlier framework versions.
Key Changes:
- Added polyfill implementations for
Parallel.ForAsync(3 overloads) targeting .NET 8.0+ - Added polyfill implementations for
Parallel.ForEachAsync(6 overloads) targeting .NET 6.0+ - Added
ParallelOptionsclass polyfill for frameworks lacking it - Introduced comprehensive test coverage for both methods
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| PolyShim/Signatures.md | Updated signature counts and documented the new Parallel and ParallelOptions polyfills with their respective overloads |
| PolyShim/PolyShim.targets | Added blank lines for formatting consistency between feature flag sections |
| PolyShim/NetCore10/ParallelOptions.cs | Added ParallelOptions class polyfill for pre-.NET Core 1.0 frameworks with CancellationToken, MaxDegreeOfParallelism, and TaskScheduler properties |
| PolyShim/NetCore10/Parallel.cs | Added empty Parallel class stub for pre-.NET Core 1.0 frameworks to support extension methods |
| PolyShim/Net80/Parallel.cs | Implemented ForAsync polyfill with 3 overloads using semaphore-based parallelism control |
| PolyShim/Net60/Parallel.cs | Implemented ForEachAsync polyfill with 6 overloads (for IEnumerable and IAsyncEnumerable) using semaphore-based parallelism control |
| PolyShim.Tests/Net80/ParallelTests.cs | Added basic tests for ForAsync including functionality and cancellation scenarios |
| PolyShim.Tests/Net60/ParallelTests.cs | Added basic tests for ForEachAsync including functionality and cancellation scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this 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 8 out of 8 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this 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 9 out of 9 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #63 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.