-
Notifications
You must be signed in to change notification settings - Fork 106
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
fix(task_manager.h): 首次tick超时任务没有重置 #46
Conversation
首次tick,task_timeout_timer_里的超时任务没有重置
感谢修复,可否也修复一下单元测试和下面 C++20 协程的相同问题(1310行)? |
C++20 task_mgr 超时任务重置,单元测试修改。
提交了,韬哥帮review下代码 |
之前提交的检查task 超时的单元测试有误,修复提交下
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## v2 #46 +/- ##
==========================================
+ Coverage 89.78% 89.83% +0.04%
==========================================
Files 36 36
Lines 2761 2773 +12
==========================================
+ Hits 2479 2491 +12
Misses 282 282
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
CASE_EXPECT_EQ(1, (int)task_mgr->get_task_size()); | ||
CASE_EXPECT_EQ(0, (int)task_mgr->get_tick_checkpoint_size()); | ||
CASE_EXPECT_EQ(0, (int)task_mgr->get_checkpoints().size()); | ||
// tick reset timeout: 3 + 5 = 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
task_mgr->tick(8);
还是需要保留哈,这是用来确保tick(8)的时候定时器还没有执行删除的。
单元测试加回 task_mgr->tick(8);
首次tick,task_timeout_timer_里的超时任务没有重置