-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: changed the calculating logic of epoll timeout provided by TimerTaskManager #2794
Merged
AlexStocks
merged 8 commits into
OpenAtomFoundation:unstable
from
cheniujh:reivsed_timer_timeout
Jul 19, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8c4cdbe
changed the returned timeout of TimerTaskManager
cheniujh 2a1b950
add comment for static cast
cheniujh 0409f3f
revised based on opinions
cheniujh b01e41a
change the Empty() logic
cheniujh ed1a113
remove duplicated comments
cheniujh 2c07854
revised based on opinions
cheniujh 09dd7a1
revised from auto pair to const auto& task
cheniujh 72e9d49
removed some comments
cheniujh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Consider reducing the default epoll timeout value.
The default timeout value of 5000ms might be too high and could lead to inefficiencies. Consider reducing it to a lower value.
Committable suggestion
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.
no, this 5000 will be returned only when the timer has no registered task inside. there's no need of reduce it to 1000 to use more cpu.
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.
@cheniujh, thank you for the clarification. Given that the 5000ms timeout is only used when there are no registered tasks, it makes sense to keep it as is to avoid unnecessary CPU usage. Your rationale is clear and well understood.
Learnings added