Skip to content

Conversation

@Tyrrrz
Copy link
Owner

@Tyrrrz Tyrrrz commented Nov 16, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 16, 2025 14:06
@Tyrrrz Tyrrrz added the enhancement New feature or request label Nov 16, 2025
Copilot finished reviewing on behalf of Tyrrrz November 16, 2025 14:08
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 TaskCompletionSource<T>.SetCanceled(CancellationToken) to enable this .NET 5.0+ API on older framework versions.

  • Implements SetCanceled(CancellationToken) extension method for TaskCompletionSource<T>
  • Adds comprehensive test coverage for both successful cancellation and error cases
  • Updates existing NetCore10 tests to verify the TrySetCanceled return value

Reviewed Changes

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

File Description
PolyShim/Net50/TaskCompletionSource.cs Adds polyfill implementation that wraps TrySetCanceled with exception handling
PolyShim.Tests/Net50/TaskCompletionSourceTests.cs Adds tests for the new SetCanceled method
PolyShim.Tests/NetCore10/TaskCompletionSourceTests.cs Enhances existing tests to capture and verify TrySetCanceled return values

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

@Tyrrrz Tyrrrz merged commit efd8c13 into master Nov 16, 2025
11 checks passed
@Tyrrrz Tyrrrz deleted the set-canceled branch November 16, 2025 14:10
@codecov
Copy link

codecov bot commented Nov 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (6d92f27) to head (76d4b07).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@     Coverage Diff      @@
##   master   #31   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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