-
Notifications
You must be signed in to change notification settings - Fork 0
refactor OpFinishHandle's handling of cqe #38
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
34ec6c9 to
64eea94
Compare
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 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.
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 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
The original
set_result()function only acceptedresandflags, which lacked extensibility. Therefore, it has been refactored into ahandle_cqe()function.