-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
timers: clarify lib/timer.js comment #11018
Conversation
LGTM |
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.
I still hold by the original wording. It is more correct if perhaps not the most obvious.
Maybe the following would be better:
Timeouts only need to process any timers scheduled to timeout by the time the list is being processed,
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.
@Fishrock123 that is better, but I find "by the time the list is being processed" to be a little clunky. How about
For the reasons stated above, a timeout only need to process timeouts from the beginning of the timeout list. Any timers after the first one encountered that does not yet need to timeout will also always be due to timeout at a later time.
How about changing:
to:
|
Yet another option: Remove the word
So: EDIT: Actually, @cjihrig's suggestion above is even better, I think. |
@Fishrock123 @lance Would you guys also be okay with @cjihrig suggestion? |
Do :thumbs: not count as LGTM? 😉 Yes that works for me. |
Sorry, I missed your thumps up :) Thanks for that! |
That could work. I'm not seeing much difference in the current PR text than what is currently in Keep in mind that It may be better to explain what that |
I realise my mistake here after re-reading it again a few times, and my original suggestion was just wrong. After reading it think the original is clear. Though, it does seem like others also find the usage of |
@Fishrock123 If we go with @cjihrig suggestion I don't think we'd need to change anything other places.
This line does sort of explain what a timeout is. Is this enough or should something else be added to the top of the comment section perhaps to make it clearer you think? |
4218f94
to
c03c950
Compare
Clarifying and using cjihrig suggestion as mentioned here: nodejs#11018 (comment)
c03c950
to
b36c429
Compare
@Fishrock123 Sorry but I forgot to tag you on this before. Would you mind taking a look and see if you find the above acceptable? |
@Fishrock123 Do you have any additional input on this issue? |
ping @Fishrock123 |
Ping @Fishrock123 |
Dimissing your review due to no response over a long time period. Please take another look.
I will land this in a few days if there is no one objecting anymore. |
Landed in 3c65a83 |
PR-URL: #11018 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Lance Ball <[email protected]>
PR-URL: #11018 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Lance Ball <[email protected]>
PR-URL: nodejs/node#11018 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Lance Ball <[email protected]>
PR-URL: nodejs/node#11018 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Lance Ball <[email protected]>
PR-URL: #11018 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Lance Ball <[email protected]>
PR-URL: #11018 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Lance Ball <[email protected]>
I stumbled a little when reading the following line:
"Timeouts only need to process any timers due to currently timeout"
and want to suggest changing currently -> the current.
The rest of the changes are only formatting to adhere to the 80
characters code style.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
timers