Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Sep 10, 2025

Allows an application to employ a pattern like this:

 _ = response.closed() => {
    // The response was cancelled
    warn!(view, "verify aborted");
}

To give up early on some work (if there is no need to send data anymore).

@patrick-ogrady patrick-ogrady marked this pull request as ready for review September 10, 2025 00:08
@patrick-ogrady patrick-ogrady added this to the v0.0.62 milestone Sep 10, 2025
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 Closed helper utility that allows applications to detect when a oneshot receiver is dropped, enabling early termination of work when the result is no longer needed.

  • Implements a Closed future that resolves when a oneshot receiver is dropped
  • Adds a ClosedExt trait providing a convenient closed() method for oneshot senders
  • Includes comprehensive test coverage for the new functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@patrick-ogrady patrick-ogrady moved this to In Progress in Tracker Sep 10, 2025
@patrick-ogrady patrick-ogrady merged commit caad7e2 into main Sep 10, 2025
37 checks passed
@patrick-ogrady patrick-ogrady deleted the closed-fut branch September 10, 2025 00:25
@github-project-automation github-project-automation bot moved this from In Progress to Done in Tracker Sep 10, 2025
@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 97.72727% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.09%. Comparing base (cff2c74) to head (dfcbe62).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
utils/src/futures.rs 97.72% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main    #1570      +/-   ##
==========================================
- Coverage   92.09%   92.09%   -0.01%     
==========================================
  Files         286      286              
  Lines       73883    73927      +44     
==========================================
+ Hits        68046    68086      +40     
- Misses       5837     5841       +4     
Files with missing lines Coverage Δ
utils/src/futures.rs 94.88% <97.72%> (+0.50%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cff2c74...dfcbe62. Read the comment docs.

🚀 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

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant