FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

worker: display MessagePort status in util.inspect() by addaleax · Pull Request #22658 · nodejs/node · GitHub

/ node Public

worker: display MessagePort status in util.inspect() - #22658

Closed
addaleax wants to merge 6 commits into
nodejs:masterfrom
addaleax:message-port-inspect
Closed

worker: display MessagePort status in util.inspect() #22658
addaleax wants to merge 6 commits into
nodejs:masterfrom
addaleax:message-port-inspect

Conversation

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

addaleax added the worker Issues and PRs related to Worker support. label Sep 2, 2018

Copy link
Copy Markdown
Collaborator

nodejs-github-bot added the worker Issues and PRs related to Worker support. label Sep 2, 2018

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member Author

@nodejs/workers

benjamingr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice!

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member Author

Fixed linter nits.

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

addaleax added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Sep 2, 2018

lundibundi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM with a few nits.


function tick(n, cb) {
if (--n > 0)
return setImmediate(() => tick(n - 1, cb));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is return needed here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No, removed it :)

port1.postMessage(2);

function tick(n, cb) {
if (--n > 0)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This actually makes half-the-n ticks, was this intentional?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nope. Thanks for catching!

Comment thread lib/internal/worker.js Outdated
} : {
active: true,
refed: ref
}, this);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nit: could you please put this on a separate line as it's kind of confusing?
Also, I'd suggest extracting second argument creation to a separate variable to make it easier to understand =). Though I'm fine with this too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done (moving to a separate line)

addaleax commented Sep 2, 2018
edited
Loading

Copy link
Copy Markdown
Member Author

Resume CI: https://ci.nodejs.org/job/node-test-pull-request/16975/ (:heavy_check_mark:)

addaleax commented Sep 5, 2018

Copy link
Copy Markdown
Member Author

Landed in caf8e7a, b3eb3a1

addaleax closed this Sep 5, 2018
addaleax deleted the message-port-inspect branch September 5, 2018 10:31
addaleax added a commit that referenced this pull request Sep 5, 2018
PR-URL: #22658
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
addaleax added a commit that referenced this pull request Sep 5, 2018
Look at the status of the `MessagePort` rather than
relying on a timeout.

PR-URL: #22658
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Sep 5, 2018
PR-URL: #22658
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Sep 5, 2018
Look at the status of the `MessagePort` rather than
relying on a timeout.

PR-URL: #22658
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Sep 6, 2018
PR-URL: #22658
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Sep 6, 2018
Look at the status of the `MessagePort` rather than
relying on a timeout.

PR-URL: #22658
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 outstanding review comments, and a CI started. worker Issues and PRs related to Worker support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL