GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Revert "embedding: make Stop() stop Workers" by addaleax · Pull Request #32623 · nodejs/node

Conversation

@addaleax

@addaleax addaleax commented Apr 2, 2020

Copy link
Copy Markdown
Member
Revert "embedding: make Stop() stop Workers"

This reverts commit 037ac99.

As flaky CI failures have revealed, this feature was implemented
incorrectly. stop_sub_worker_contexts() needs to be called on the
thread on which the Environment is currently running, it’s not
thread-safe. The current API requires Stop() to be thread-safe,
though.

We could add a new API for this, but unless there’s demand, that’s
probably not necessary as FreeEnvironment() will also stop Workers,
which is commonly the next action on an Environment instance after
having Stop() called on it.

Refs: #32531

src,test: add regression test for nested Worker termination

This adds a regression test for terminating a Worker inside which
another Worker is running.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
addaleax added 2 commits April 2, 2020 23:40
@addaleax
Revert "embedding: make Stop() stop Workers"
0830b83
This reverts commit 037ac99.

As flaky CI failures have revealed, this feature was implemented
incorrectly. `stop_sub_worker_contexts()` needs to be called on the
thread on which the `Environment` is currently running, it’s not
thread-safe. The current API requires `Stop()` to be thread-safe,
though.

We could add a new API for this, but unless there’s demand, that’s
probably not necessary as `FreeEnvironment()` will also stop Workers,
which is commonly the next action on an `Environment` instance after
having `Stop()` called on it.

Refs: nodejs#32531
@addaleax
src,test: add regression test for nested Worker termination
80d4ba8
This adds a regression test for terminating a Worker inside which
another Worker is running.
@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 involving general changes in the lib/ or src/ directories. labels Apr 2, 2020
@addaleax addaleax added embedding Issues and PRs related to embedding Node.js in another project. worker Issues and PRs related to the worker_threads module and Worker API. c++ Issues and PRs that require attention from people who are familiar with C++. and removed c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. labels Apr 2, 2020
This was referenced Apr 2, 2020
embedding: provide hook for custom process.exit() behaviour #32531
Closed
workers: implement --max-worker-threads command line option #32606
Closed
@addaleax addaleax added the fast-track PRs proposed for a shorter-than-standard waiting period before landing. label Apr 2, 2020
@addaleax

addaleax commented Apr 2, 2020

Copy link
Copy Markdown
Member Author

Fast-track?

jasnell, cjihrig, and gireeshpunathil reacted with thumbs up emoji
All reactions
  • 👍 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 2, 2020

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Apr 2, 2020
View reviewed changes
cjihrig
cjihrig approved these changes Apr 3, 2020
View reviewed changes
@addaleax addaleax added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Apr 3, 2020
@nodejs-github-bot

nodejs-github-bot commented Apr 3, 2020

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gireeshpunathil
gireeshpunathil approved these changes Apr 3, 2020
View reviewed changes
addaleax added a commit that referenced this pull request Apr 3, 2020
@addaleax
Revert "embedding: make Stop() stop Workers"
f621536
This reverts commit 037ac99.

As flaky CI failures have revealed, this feature was implemented
incorrectly. `stop_sub_worker_contexts()` needs to be called on the
thread on which the `Environment` is currently running, it’s not
thread-safe. The current API requires `Stop()` to be thread-safe,
though.

We could add a new API for this, but unless there’s demand, that’s
probably not necessary as `FreeEnvironment()` will also stop Workers,
which is commonly the next action on an `Environment` instance after
having `Stop()` called on it.

Refs: #32531

PR-URL: #32623
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
addaleax added a commit that referenced this pull request Apr 3, 2020
@addaleax
src,test: add regression test for nested Worker termination
e629366
This adds a regression test for terminating a Worker inside which
another Worker is running.

PR-URL: #32623
Refs: #32531
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
@addaleax

addaleax commented Apr 3, 2020

Copy link
Copy Markdown
Member Author

Landed in 7947811...e629366

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax addaleax closed this Apr 3, 2020
@addaleax
addaleax deleted the revert-stop-workers branch April 3, 2020 02:33
BethGriggs pushed a commit that referenced this pull request Apr 7, 2020
@addaleax @BethGriggs
Revert "embedding: make Stop() stop Workers"
b5aaf23
This reverts commit 037ac99.

As flaky CI failures have revealed, this feature was implemented
incorrectly. `stop_sub_worker_contexts()` needs to be called on the
thread on which the `Environment` is currently running, it’s not
thread-safe. The current API requires `Stop()` to be thread-safe,
though.

We could add a new API for this, but unless there’s demand, that’s
probably not necessary as `FreeEnvironment()` will also stop Workers,
which is commonly the next action on an `Environment` instance after
having `Stop()` called on it.

Refs: #32531

PR-URL: #32623
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
BethGriggs pushed a commit that referenced this pull request Apr 7, 2020
@addaleax @BethGriggs
src,test: add regression test for nested Worker termination
ad0f4f5
This adds a regression test for terminating a Worker inside which
another Worker is running.

PR-URL: #32623
Refs: #32531
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
@targos targos added dont-land-on-v10.x labels Apr 11, 2020
targos pushed a commit that referenced this pull request Apr 12, 2020
@addaleax @targos
src,test: add regression test for nested Worker termination
055c568
This adds a regression test for terminating a Worker inside which
another Worker is running.

PR-URL: #32623
Refs: #32531
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
@targos targos mentioned this pull request Apr 13, 2020
v13.13.0 release proposal #32813
Merged
@BethGriggs BethGriggs mentioned this pull request Apr 14, 2020
2020-04-21, Version 14.0.0 (Current) #32181
Merged
@joyeecheung joyeecheung mentioned this pull request Jun 8, 2020
src: retrieve binding data from the context #33139
Closed
3 tasks done
@addaleax addaleax removed the dont-land-on-v12.x label Feb 18, 2021
addaleax added a commit that referenced this pull request Feb 18, 2021
@addaleax
Revert "embedding: make Stop() stop Workers"
ea534c2
This reverts commit 037ac99.

As flaky CI failures have revealed, this feature was implemented
incorrectly. `stop_sub_worker_contexts()` needs to be called on the
thread on which the `Environment` is currently running, it’s not
thread-safe. The current API requires `Stop()` to be thread-safe,
though.

We could add a new API for this, but unless there’s demand, that’s
probably not necessary as `FreeEnvironment()` will also stop Workers,
which is commonly the next action on an `Environment` instance after
having `Stop()` called on it.

Refs: #32531

PR-URL: #32623
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
addaleax added a commit that referenced this pull request Feb 18, 2021
@addaleax
src,test: add regression test for nested Worker termination
dfaa658
This adds a regression test for terminating a Worker inside which
another Worker is running.

PR-URL: #32623
Refs: #32531
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
@addaleax

addaleax commented Feb 18, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

I added this to v12.x-staging because people were reporting this bug occurring in v12.20.1, and it's a change that should definitely land everywhere where the original bug was also introduced. /cc @nodejs/lts

nicolo-ribaudo and ExE-Boss reacted with eyes emoji
All reactions
  • 👀 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicolo-ribaudo nicolo-ribaudo mentioned this pull request Feb 18, 2021
Run Babel asynchronously in @babel/register babel/babel#12814
Closed
richardlau pushed a commit that referenced this pull request Feb 22, 2021
@addaleax @richardlau
Revert "embedding: make Stop() stop Workers"
c54186d
This reverts commit 037ac99.

As flaky CI failures have revealed, this feature was implemented
incorrectly. `stop_sub_worker_contexts()` needs to be called on the
thread on which the `Environment` is currently running, it’s not
thread-safe. The current API requires `Stop()` to be thread-safe,
though.

We could add a new API for this, but unless there’s demand, that’s
probably not necessary as `FreeEnvironment()` will also stop Workers,
which is commonly the next action on an `Environment` instance after
having `Stop()` called on it.

Refs: #32531

PR-URL: #32623
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
richardlau pushed a commit that referenced this pull request Feb 22, 2021
@addaleax @richardlau
src,test: add regression test for nested Worker termination
0692611
This adds a regression test for terminating a Worker inside which
another Worker is running.

PR-URL: #32623
Refs: #32531
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
@richardlau richardlau mentioned this pull request Mar 18, 2021
v12.22.0 proposal #37797
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@cjihrig cjihrig cjihrig approved these changes
@gireeshpunathil gireeshpunathil gireeshpunathil approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. embedding Issues and PRs related to embedding Node.js in another project. fast-track PRs proposed for a shorter-than-standard waiting period before landing. worker Issues and PRs related to the worker_threads module and Worker API.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@addaleax @nodejs-github-bot @jasnell @cjihrig @gireeshpunathil @targos
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.