Skip to content

refactor pending_works_#120

Merged
wokron merged 5 commits into
masterfrom
refactor-pending-works
May 22, 2026
Merged

refactor pending_works_#120
wokron merged 5 commits into
masterfrom
refactor-pending-works

Conversation

@wokron
Copy link
Copy Markdown
Member

@wokron wokron commented May 21, 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 refactors how Runtime tracks pending work and determines when its event loop may exit, and adjusts Futex/Channel awaiter paths to match the new pending-work accounting.

Changes:

  • Replace the “sentinel” pending_works_ behavior with an explicit exit_allowed_ flag and updated loop exit condition.
  • Make pending_works_ non-atomic and restrict pend_work() / resume_work() to the current runtime thread (via assertions).
  • Move pend_work() calls in Futex/Channel from request/enqueue time to the finish-handle start() path.

Reviewed changes

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

File Description
include/condy/runtime.hpp Introduces exit_allowed_, refactors exit condition, and changes pending-work tracking to non-atomic + assertion-guarded APIs.
include/condy/futex.hpp Moves pend_work() from request_wait_() enqueue to finish-handle start().
include/condy/channel.hpp Moves pend_work() from push/pop request enqueue paths to finish-handle start() for both push and pop.

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

Comment thread include/condy/futex.hpp
Comment thread include/condy/channel.hpp
Comment thread include/condy/runtime.hpp
Comment thread include/condy/channel.hpp
@wokron wokron marked this pull request as ready for review May 21, 2026 11:49
@wokron wokron merged commit c46f939 into master May 22, 2026
14 checks passed
@wokron wokron deleted the refactor-pending-works branch May 22, 2026 04:04
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