refactor OpFinishHandle's handling of cqe#38
Merged
Conversation
34ec6c9 to
64eea94
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors completion handling for io_uring operations by replacing OpFinishHandle::set_result(res, flags) with a more extensible handle_cqe(io_uring_cqe*) flow, and updates runtime/test code to use the new CQE-driven handling (including multishot and zero-copy behaviors).
Changes:
- Replaced
set_result()usage withhandle_cqe()across runtime and tests. - Reworked multishot/zero-copy completion behavior to be handled under
WorkType::Commonvia anActionreturn contract. - Updated tests and
WorkTypeto reflect the new completion-dispatch approach.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_work_type.cpp | Updates work-type encode/decode tests for the adjusted WorkType set. |
| tests/test_ring.cpp | Uses handle_cqe() and updates handle storage for ring operation tests. |
| tests/test_op_finish_handle.cpp | Refactors tests to drive finish handles via CQEs and validate new action semantics. |
| tests/test_op_awaiter.cpp | Updates awaiter event loops and mock multishot behavior to call handle_cqe(). |
| tests/test_awaiter_operations.cpp | Switches event loop completion handling to handle_cqe(). |
| include/condy/work_type.hpp | Removes MultiShot/ZeroCopy enum members and keeps only core work routing types. |
| include/condy/runtime.hpp | Consolidates finish-handle CQE processing under WorkType::Common and uses Action results. |
| include/condy/finish_handles.hpp | Introduces Action + function-pointer CQE dispatch to support extensible CQE handling. |
| include/condy/concepts.hpp | Updates OpFinishHandleLike concept to require handle_cqe() returning Action. |
| include/condy/awaiters.hpp | Changes SQE user_data setup for operations to use direct handle pointers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
64eea94 to
3514f91
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3514f91 to
4e176ae
Compare
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.
The original
set_result()function only acceptedresandflags, which lacked extensibility. Therefore, it has been refactored into ahandle_cqe()function.