Dev/v13.x#128
Merged
Merged
Conversation
Recurring timer callbacks now receive the timerfd expiration count so they can decide whether to run once or N times. Add backward-compat overloads that preserve old loop-N-times behavior for void(void*) callers. Add tests for void(void*, uint64_t) thread and global timer callbacks. Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
…v13.x Brings the recurring-timer fix from stable/v12.x forward to v13. Upstream 572d768 changes timer_callback_t from void(void*) to void(void*, uint64_t): the reactor hands the timerfd expiration count to the callback once instead of blindly invoking it N times, and adds SFINAE backward-compat overloads so existing void(void*) callers keep their loop-N-times behavior. The literal patch did not apply cleanly because v13's timer subsystem was refactored; resolved as follows: - timer_callback_t moved from the (now deleted) iomgr_timer.hpp into iomgr.hpp; applied the signature change there. iomgr_timer.hpp stays deleted. - Dropped the upstream SPDK hunks (timer_spdk / spdk_thread_timer_info) -- SPDK was removed in v13. - Kept conanfile.py at 13.0.0 (ignored the 12.0.3 bump). - Updated timer_epoll::on_timer_armed declaration for the new exp_count param. - Updated the v13-only RAII layer's adapt() (timer.cpp) for the 2-arg signature; a high-level void() recurring callback fires once per notification (the "invoke once" default), not N times. - Kept both the v13 RAII lifecycle test and the upstream 2-param tests; ported the thread-timer test from io_fiber_t/iofiber_self() to the v13 IOReactor*/this_reactor() API.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev/v13.x #128 +/- ##
============================================
Coverage ? 46.28%
============================================
Files ? 35
Lines ? 1415
Branches ? 632
============================================
Hits ? 655
Misses ? 325
Partials ? 435 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.