Skip to content

worker: set up child Isolate inside Worker thread #26011

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 7 commits into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Feb 8, 2019

worker: pre-allocate thread id

Allocate a thread id before actually creating the Environment instance.

worker: set up child Isolate inside Worker thread

Refs: #24016

test: add Worker + --prof regression test

Fixes: #24016

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

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Feb 8, 2019
@addaleax
Copy link
Member Author

addaleax commented Feb 8, 2019

@nodejs/workers Sorry the middle commit is such a big change, but if one of you could give this a look, that would be awesome.

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

@addaleax addaleax added worker Issues and PRs related to Worker support. and removed lib / src Issues and PRs related to general changes in the lib or src directory. labels Feb 8, 2019
@benjamingr
Copy link
Member

(also: the middle commit is the test 😅 )

@addaleax
Copy link
Member Author

addaleax commented Feb 9, 2019

@benjamingr That’s just github showing the commit out-of-order because it orders by author date rather than actual commit order :)

@addaleax
Copy link
Member Author

addaleax commented Feb 9, 2019

@addaleax
Copy link
Member Author

addaleax commented Feb 9, 2019

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 9, 2019
@addaleax
Copy link
Member Author

addaleax commented Feb 10, 2019

5th attempt at getting a green ARM fanned CI: https://ci.nodejs.org/job/node-test-commit-arm-fanned/6377/
Resume CI: https://ci.nodejs.org/job/node-test-commit-arm-fanned/6381/

This is frustrating, especially since this is obviously infrastructure-related and the only difference to the last green CI is a comment. :/

@addaleax
Copy link
Member Author

@nodejs/build-infra Can somebody take a look at https://ci.nodejs.org/job/node-test-binary-arm/6092/RUN_SUBSET=2,label=pi1-docker/console?

@addaleax
Copy link
Member Author

@addaleax
Copy link
Member Author

Landed in e11388b...902c71a

@addaleax addaleax closed this Feb 11, 2019
@addaleax addaleax deleted the worker-on-thread branch February 11, 2019 19:02
pull bot pushed a commit to SimenB/node that referenced this pull request Feb 11, 2019
Allocate a thread id before actually creating the Environment instance.

PR-URL: nodejs#26011
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
pull bot pushed a commit to SimenB/node that referenced this pull request Feb 11, 2019
Refs: nodejs#24016

PR-URL: nodejs#26011
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
pull bot pushed a commit to SimenB/node that referenced this pull request Feb 11, 2019
Fixes: nodejs#24016

PR-URL: nodejs#26011
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
addaleax added a commit that referenced this pull request Feb 13, 2019
Allocate a thread id before actually creating the Environment instance.

PR-URL: #26011
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
addaleax added a commit that referenced this pull request Feb 13, 2019
Refs: #24016

PR-URL: #26011
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
addaleax added a commit that referenced this pull request Feb 13, 2019
Fixes: #24016

PR-URL: #26011
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@targos targos mentioned this pull request Feb 14, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. worker Issues and PRs related to Worker support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants