Skip to content

simplify schedule logic#47

Merged
wokron merged 13 commits into
masterfrom
simplify-schedule
Feb 16, 2026
Merged

simplify schedule logic#47
wokron merged 13 commits into
masterfrom
simplify-schedule

Conversation

@wokron
Copy link
Copy Markdown
Member

@wokron wokron commented Feb 16, 2026

No description provided.

@wokron wokron marked this pull request as ready for review February 16, 2026 05:27
@wokron wokron requested a review from Copilot February 16, 2026 05:27
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 pull request simplifies the schedule logic in the runtime by removing the eventfd-based notification mechanism and replacing it with a more streamlined approach using msg_ring operations. The changes eliminate the WorkType::Notify enum value and the AsyncWaiter class, which previously managed eventfd-based notifications for io_uring versions less than 2.12.

Changes:

  • Removed WorkType::Notify and AsyncWaiter class, simplifying the notification mechanism
  • Introduced ThreadLocalRing helper for synchronous msg_ring operations on older io_uring versions
  • Refactored schedule() method with improved double-checked locking pattern for better performance
  • Changed runtime state management to acquire mutex during global queue flush and state transition for better thread safety
  • Added comprehensive tests for cross-runtime and cross-thread allow_exit() scenarios

Reviewed changes

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

Show a summary per file
File Description
include/condy/work_type.hpp Removed WorkType::Notify enum value as part of notification simplification
include/condy/runtime.hpp Major refactoring: added ThreadLocalRing and sync_msg_ring helpers, simplified schedule() and wakeup_() logic, improved state transition synchronization
include/condy/awaiters.hpp Removed drain operation notification for io_uring < 2.12
tests/test_work_type.cpp Removed test case for the deleted WorkType::Notify
tests/test_runtime_options.cpp Removed obsolete comment about eventfd+iopoll workaround
tests/test_runtime.cpp Added new test cases for cross-runtime and cross-thread allow_exit() functionality

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

Comment thread include/condy/runtime.hpp
Comment thread include/condy/awaiters.hpp
@wokron wokron merged commit 97c9247 into master Feb 16, 2026
17 checks passed
@wokron wokron deleted the simplify-schedule branch February 16, 2026 05:38
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