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

doc: replace outdated util.promisify timer examples with references to new awaitable timers #39164

Closed
wants to merge 3 commits into from

Conversation

foxxyz
Copy link
Contributor

@foxxyz foxxyz commented Jun 26, 2021

Since the new awaitable timers graduated in 16.0.0, the references to using util.promisify to promisify the callback versions of setTimeout(), setImmediate(), etc, are confusing and likely outdated.

This PR removes the util.promisify code samples and links to the timers/promises variants instead.

Furthermore, it adds a link to the async iterator version of setInterval() in the respective docs for the callback-based version.

@github-actions github-actions bot added doc Issues and PRs related to the documentations. timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. labels Jun 26, 2021
doc/api/timers.md Outdated Show resolved Hide resolved
doc/api/timers.md Outdated Show resolved Hide resolved
@foxxyz foxxyz force-pushed the timers-doc-fix branch 2 times, most recently from 738ebc1 to bc480ea Compare June 27, 2021 08:17
@foxxyz
Copy link
Contributor Author

foxxyz commented Jun 27, 2021

Re-pushed commits to keep commit messages below the 72 char limit as indicated by CI.

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 27, 2021
targos pushed a commit that referenced this pull request Jul 11, 2021
PR-URL: #39164
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targos
Copy link
Member

targos commented Jul 11, 2021

Landed in 72f198b

@targos targos closed this Jul 11, 2021
@foxxyz foxxyz deleted the timers-doc-fix branch July 11, 2021 07:35
targos pushed a commit that referenced this pull request Jul 11, 2021
PR-URL: #39164
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants