feat(io_uring): generic access to context and push for Ring and Completion#10071
Merged
Conversation
Author
|
Alternative approach using enum is included in #9856 |
1fa8180 to
5e983bf
Compare
Author
|
@alessandrod you mentioned the trait approach is preferable. I suppose |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #10071 +/- ##
=========================================
- Coverage 83.0% 83.0% -0.1%
=========================================
Files 849 849
Lines 318266 318253 -13
=========================================
- Hits 264364 264351 -13
Misses 53902 53902 🚀 New features to boost your workflow:
|
vadorovsky
previously approved these changes
Feb 20, 2026
Member
vadorovsky
left a comment
There was a problem hiding this comment.
I'm in favor of that! I was about to nitpick #9856, that I would prefer a trait over a local enum. The name is good enough for me.
5e983bf to
8edc156
Compare
Author
|
Thanks, I will proceed with merging, if we want a different name, we can always update later. |
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
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.
Problem
RingandCompletionexpose similar access functions for context and allowing to push new operations. Sometimes there is client code that should execute the same logic irrespective of operation onRingorCompletion, so there should be a way to generalize access.Summary of Changes
Introduce trait encapsulating context accessors and
push.Note: moving the functions to trait breaks existing code requiring import of the trait, so I'm open to alternative approaches:
RingandCompletion&mut Ringor&mut Completionfor the rare case of having generic code using either of them