Skip to content
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

This converts the socket IO timer to a timer started/stopped with raii. #2965

Closed
wants to merge 5 commits into from

Conversation

clemahieu
Copy link
Contributor

Each socket has a deadline_next value that specifies when the next i/o deadline is to occur.
Deadlines are either: a timeout for an I/O operation or, a timeout for inactivity. When an I/O operation completes, a deadline for inactivity is started.
Each creation of a timer stores a timestamp and sets the deadline in the socket to be the same value. Upon timer destruction, iff the socket value equals the deadline timer, we'll set a new timeout deadline, otherwise we have overlapping I/O operations and another timer will do the deadline setting.

Each socket has a deadline_next value that specifies when the next i/o deadline is to occur.
Deadlines are either: a timeout for an I/O operation or, a timeout for inactivity. When an I/O operation completes, a deadline for inactivity is started.
Each creation of a timer stores a timestamp and sets the deadline in the socket to be the same value. Upon timer destruction, iff the socket value equals the deadline timer, we'll set a new timeout deadline, otherwise we have overlapping I/O operations and another timer will do the deadline setting.
SergiySW
SergiySW previously approved these changes Oct 9, 2020
@guilhermelawless guilhermelawless removed their request for review January 17, 2021 18:44
@zhyatt zhyatt modified the milestones: V22.0, V23.0 Apr 27, 2021
@zhyatt zhyatt assigned thsfs and unassigned clemahieu Oct 6, 2021
@thsfs thsfs dismissed stale reviews from ghost and SergiySW via f7cef64 October 26, 2021 19:14
@thsfs thsfs requested review from dsiganos and theohax and removed request for wezrule October 26, 2021 19:19
@clemahieu clemahieu modified the milestones: V23.0, V24.0 Nov 2, 2021
@thsfs thsfs mentioned this pull request Nov 12, 2021
@thsfs thsfs assigned dsiganos and unassigned thsfs Jan 19, 2022
@dsiganos
Copy link
Contributor

dsiganos commented Mar 8, 2022

This change brings code complexity and it is not clear that it gives us much in return.
So we decided to cleanup and document the existing code instead (#3704).

@dsiganos dsiganos closed this Mar 8, 2022
@zhyatt zhyatt removed this from the V24.0 milestone Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants