Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

worker: drain the messages from the internal message port #24932

Closed
wants to merge 1 commit into from

Conversation

@yaelhe
Copy link
Contributor

commented Dec 10, 2018

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
worker: drain the messages from the internal message port
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: #24636
@benjamingr

This comment has been minimized.

@benjamingr
Copy link
Member

left a comment

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

@addaleax

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

@Trott

This comment has been minimized.

Copy link
Member

commented Dec 11, 2018

@danbev

This comment has been minimized.

Copy link
Member

commented Dec 13, 2018

Landed in c61327d. 🎉

@danbev danbev closed this Dec 13, 2018

danbev added a commit that referenced this pull request Dec 13, 2018
worker: drain messages from internal message port
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 <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@addaleax addaleax referenced this pull request Dec 15, 2018
3 of 3 tasks complete
BethGriggs added a commit that referenced this pull request Dec 17, 2018
worker: drain messages from internal message port
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 <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@BethGriggs BethGriggs referenced this pull request Dec 18, 2018
refack added a commit to refack/node that referenced this pull request Jan 14, 2019
worker: drain messages from internal message port
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 <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
BethGriggs added a commit that referenced this pull request Feb 12, 2019
worker: drain messages from internal message port
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 <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@BethGriggs BethGriggs referenced this pull request Feb 12, 2019
BethGriggs added a commit that referenced this pull request Feb 20, 2019
worker: drain messages from internal message port
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 <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
rvagg added a commit that referenced this pull request Feb 28, 2019
worker: drain messages from internal message port
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 <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.