-
Notifications
You must be signed in to change notification settings - Fork 10
Inline timer fast paths to eliminate cross-TU calls on common operations #137
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
Move expiry_, heap_index_, and might_have_pending_waits_ from the private timer_impl to the public base class so cancel(), expires_at(), expires_after(), expiry(), and await_suspend can check for no-op conditions inline. Use time_point::min() as an already-expired sentinel to skip clock_gettime in expires_after() and wait() for zero-delay timers.
📝 WalkthroughWalkthroughThe changes refactor timer expiry and cancellation handling by introducing inline fast-path optimization in the header file, extending timer_impl with new state tracking members, consolidating expiry management through a unified update mechanism in the service layer, and renaming public API methods in the core timer implementation. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #137 +/- ##
===========================================
+ Coverage 81.15% 81.24% +0.08%
===========================================
Files 64 64
Lines 5667 5710 +43
===========================================
+ Hits 4599 4639 +40
- Misses 1068 1071 +3
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
An automated preview of the documentation is available at https://137.corosio.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-02-12 20:10:21 UTC |
|
GCOVR code coverage report https://137.corosio.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-02-12 20:15:13 UTC |
Move expiry_, heap_index_, and might_have_pending_waits_ from the private timer_impl to the public base class so cancel(), expires_at(), expires_after(), expiry(), and await_suspend can check for no-op conditions inline. Use time_point::min() as an already-expired sentinel to skip clock_gettime in expires_after() and wait() for zero-delay timers.
Summary by CodeRabbit
New Features
Performance Improvements