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 — worker: drain the messages from the internal message port by yaelhe · Pull Request #24932 · nodejs/node

Conversation

@yaelhe

@yaelhe yaelhe commented Dec 10, 2018

Copy link
Copy Markdown
Contributor

When the worker thread exits, drain the messages also from the internal
message port so that the call to 'kDispose' will occur only after all
the messages from the worker were processed in the parent, so stdio
messages from the worker will be successfully pushed to their target
streams in the parent.

Thanks to @addaleax for the actual solution :)

Fixes: #24636

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.

benjamingr, bricss, danbev, AdirAmsalem, and oferze reacted with thumbs up emoji AdirAmsalem reacted with hooray emoji
All reactions
  • 👍 5 reactions
  • 🎉 1 reaction
@yaelhe
worker: drain the messages from the internal message port
dd81922
When the worker thread exits, drain the messages also from the internal
message port so that the call to 'kDispose' will occur only after all
the messages from the worker were processed in the parent, so stdio
messages from the worker will be successfully pushed to their target
streams in the parent.

Fixes: nodejs#24636
@nodejs-github-bot nodejs-github-bot added the worker Issues and PRs related to the worker_threads module and Worker API. label Dec 10, 2018
@benjamingr

benjamingr commented Dec 10, 2018

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

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

benjamingr
benjamingr approved these changes Dec 10, 2018
View reviewed changes

@benjamingr benjamingr left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Welcome to Node.js and thank you for the contribution. Hopefully the first of many :)

Sorry, something went wrong.

Uh oh!

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

All reactions
addaleax
addaleax approved these changes Dec 10, 2018
View reviewed changes
@addaleax

addaleax commented Dec 10, 2018

Copy link
Copy Markdown
Member

Nice work!

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax addaleax added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Dec 10, 2018
@Trott

Trott commented Dec 11, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/19416/ ✔️

All reactions

Sorry, something went wrong.

Uh oh!

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

@danbev

danbev commented Dec 13, 2018

Copy link
Copy Markdown
Contributor

Landed in c61327d. 🎉

All reactions

Sorry, something went wrong.

Uh oh!

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

@danbev danbev closed this Dec 13, 2018
danbev pushed a commit that referenced this pull request Dec 13, 2018
@yaelhe @danbev
worker: drain messages from internal message port
c61327d
When the worker thread exits, drain the messages also from the internal
message port so that the call to 'kDispose' will occur only after all
the messages from the worker were processed in the parent, so stdio
messages from the worker will be successfully pushed to their target
streams in the parent.

PR-URL: #24932
Fixes: #24636
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@addaleax addaleax mentioned this pull request Dec 15, 2018
lib: fix worker threads can't read stdout #24652
Closed
3 tasks done
BethGriggs pushed a commit that referenced this pull request Dec 17, 2018
@yaelhe @BethGriggs
worker: drain messages from internal message port
331f604
When the worker thread exits, drain the messages also from the internal
message port so that the call to 'kDispose' will occur only after all
the messages from the worker were processed in the parent, so stdio
messages from the worker will be successfully pushed to their target
streams in the parent.

PR-URL: #24932
Fixes: #24636
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Dec 18, 2018
V11.5.0 proposal #25102
Merged
@beevelop beevelop mentioned this pull request Dec 18, 2018
2018-12-18 Version 11.5.0 (Current) @BethGriggs beevelop/docker-android-nodejs#272
Closed
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
@yaelhe @refack
worker: drain messages from internal message port
f580856
When the worker thread exits, drain the messages also from the internal
message port so that the call to 'kDispose' will occur only after all
the messages from the worker were processed in the parent, so stdio
messages from the worker will be successfully pushed to their target
streams in the parent.

PR-URL: nodejs#24932
Fixes: nodejs#24636
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
BethGriggs pushed a commit that referenced this pull request Feb 12, 2019
@yaelhe @BethGriggs
worker: drain messages from internal message port
483ff7b
When the worker thread exits, drain the messages also from the internal
message port so that the call to 'kDispose' will occur only after all
the messages from the worker were processed in the parent, so stdio
messages from the worker will be successfully pushed to their target
streams in the parent.

PR-URL: #24932
Fixes: #24636
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@BethGriggs BethGriggs added the land-on-v10.x label Feb 12, 2019
@BethGriggs BethGriggs mentioned this pull request Feb 12, 2019
v10.15.3 proposal #26063
Merged
BethGriggs pushed a commit that referenced this pull request Feb 20, 2019
@yaelhe @BethGriggs
worker: drain messages from internal message port
5260750
When the worker thread exits, drain the messages also from the internal
message port so that the call to 'kDispose' will occur only after all
the messages from the worker were processed in the parent, so stdio
messages from the worker will be successfully pushed to their target
streams in the parent.

PR-URL: #24932
Fixes: #24636
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
rvagg pushed a commit that referenced this pull request Feb 28, 2019
@yaelhe @rvagg
worker: drain messages from internal message port
c9bfe43
When the worker thread exits, drain the messages also from the internal
message port so that the call to 'kDispose' will occur only after all
the messages from the worker were processed in the parent, so stdio
messages from the worker will be successfully pushed to their target
streams in the parent.

PR-URL: #24932
Fixes: #24636
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@addaleax addaleax addaleax approved these changes
@benjamingr benjamingr benjamingr 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. 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.

Worker Threads can't read stdout

Uh oh!

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

7 participants

@yaelhe @benjamingr @addaleax @Trott @danbev @BethGriggs @nodejs-github-bot
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.