Skip to content

support cancel ops from other thread#83

Merged
wokron merged 8 commits intomasterfrom
external-cancel
Apr 2, 2026
Merged

support cancel ops from other thread#83
wokron merged 8 commits intomasterfrom
external-cancel

Conversation

@wokron
Copy link
Copy Markdown
Owner

@wokron wokron commented Apr 1, 2026

No description provided.

Copy link
Copy Markdown

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 support for issuing io_uring cancellation requests against a condy::Runtime from outside the owning runtime thread, and introduces tests to exercise cancellation both cross-task and cross-thread.

Changes:

  • Add WorkType::Cancel and route cancellation requests through msg_ring when invoked from another runtime/thread.
  • Introduce Runtime::cancel(void*) and internal helpers to prepare cancel SQEs.
  • Update Channel cancel paths to defer resume_work() until the scheduled handle runs, and add new runtime cancellation tests.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
tests/test_runtime.cpp Adds tests for cancellation from another task and from another thread.
include/condy/work_type.hpp Adds WorkType::Cancel tag for pointer-encoded work dispatch.
include/condy/runtime.hpp Implements cross-thread/cross-runtime cancellation via msg_ring + Cancel work dispatch.
include/condy/channel.hpp Adjusts cancellation scheduling so pending-work accounting is resumed at invocation time.

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

Copy link
Copy Markdown

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

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


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

@wokron wokron marked this pull request as ready for review April 2, 2026 07:10
@wokron wokron merged commit 8140789 into master Apr 2, 2026
15 checks passed
@wokron wokron deleted the external-cancel branch April 2, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants