Skip to content

process: refactor global.queueMicrotask() - #26523

Closed
joyeecheung wants to merge 1 commit into
nodejs:masterfrom
joyeecheung:refactor-qmt
Closed

process: refactor global.queueMicrotask()#26523
joyeecheung wants to merge 1 commit into
nodejs:masterfrom
joyeecheung:refactor-qmt

Conversation

@joyeecheung

Copy link
Copy Markdown
Member
  • Lazy load async_hooks in the implementation
  • Rename process/next_tick.js to process/task_queues.js
    and move the implementation of global.queueMicrotask()
    there since these methods are conceptually related to
    each other.
  • Move the bindings used by global.queueMicrotask() into
    node_task_queue.cc instead of the generic node_util.cc
  • Use defineOperation to define global.queueMicrotask()
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

- Lazy load `async_hooks` in the implementation
- Rename `process/next_tick.js` to `process/task_queues.js`
and move the implementation of `global.queueMicrotask()`
there since these methods are conceptually related to
each other.
- Move the bindings used by `global.queueMicrotask()` into
`node_task_queue.cc` instead of the generic `node_util.cc`
- Use `defineOperation` to define `global.queueMicrotask()`
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Mar 8, 2019
@joyeecheung
joyeecheung requested a review from devsnekMarch 8, 2019 15:44
@joyeecheung

Copy link
Copy Markdown
MemberAuthor

CI: https://ci.nodejs.org/job/node-test-pull-request/21337/

This is sort-of an alternative to #26520 but it's certainly not fast-trackable.

@joyeecheungjoyeecheung added the process Issues and PRs related to the process subsystem. label Mar 8, 2019
@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 8, 2019
@danbev

Copy link
Copy Markdown
Contributor

Landed in 8d669bb.

@danbevdanbev closed this Mar 11, 2019
danbev pushed a commit that referenced this pull request Mar 11, 2019
- Lazy load `async_hooks` in the implementation
- Rename `process/next_tick.js` to `process/task_queues.js`
and move the implementation of `global.queueMicrotask()`
there since these methods are conceptually related to
each other.
- Move the bindings used by `global.queueMicrotask()` into
`node_task_queue.cc` instead of the generic `node_util.cc`
- Use `defineOperation` to define `global.queueMicrotask()`
PR-URL: #26523
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR

Copy link
Copy Markdown
Member

This does not land cleanly on v11. It seems to rely on other commits that should be backported first. It might land cleanly after landing the other backport requested PRs.

targos pushed a commit that referenced this pull request Mar 27, 2019
- Lazy load `async_hooks` in the implementation
- Rename `process/next_tick.js` to `process/task_queues.js`
and move the implementation of `global.queueMicrotask()`
there since these methods are conceptually related to
each other.
- Move the bindings used by `global.queueMicrotask()` into
`node_task_queue.cc` instead of the generic `node_util.cc`
- Use `defineOperation` to define `global.queueMicrotask()`
PR-URL: #26523
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request Mar 27, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.lib / srcIssues and PRs related to general changes in the lib or src directory.processIssues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@joyeecheung@nodejs-github-bot@danbev@BridgeAR@jasnell@addaleax@devsnek@targos