-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
doc: add timer classes #6206
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
doc: add timer classes #6206
Conversation
doc/api/timers.markdown
Outdated
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.
should be "separate timer" still, the Timeout class is the same.
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.
Or, "separate underlying timer handle"
|
The concept of timers being different from immediates goes a little beyond the classes in certain implementation and execution details, which is what some of the comments address. |
|
@Fishrock123 alright, inline comments addressed.
Anything else I should do to address this? Maybe point out the distinction in the class definitions in the doc? |
7da4fd4 to
c7066fb
Compare
|
don't land this, see https://github.com/nodejs/node/pull/6436/files#r61430203 |
|
@Fishrock123 It looks like #6436 has been updated and no longer collides with this one. I'll rebase though. |
The timers returned by `setTimeout` and friends are actually instances of `Timeout` and `Immediate`. Documenting them as such, so that the `ref` and `unref` methods can be identified as methods on `Timeout` objects. Sparked by discussion in nodejs#5792
|
Closing as this is now part of #6937 |
Checklist
Affected core subsystem(s)
doc
Description of change
The timers returned by
setTimeoutand friends are actually instancesof
TimeoutandImmediate. Documenting them as such, so that therefandunrefmethods can be identified as methods onTimeoutobjects.
Sparked by discussion in #5792 w/ @Fishrock123