child_process: tracking unrefdness of child_process#5827
Closed
thlorenz wants to merge 2 commits intonodejs:masterfrom
Closed
child_process: tracking unrefdness of child_process#5827thlorenz wants to merge 2 commits intonodejs:masterfrom
thlorenz wants to merge 2 commits intonodejs:masterfrom
Conversation
- initializing `_unref` to `false` when child process is created - updating that value each time either `unref()` or `ref()` is invoked - this mirrors the implementation in `lib/net.js` - adding test to check unrefdness tracking
Contributor
|
LGTM, but the tests would be a little more readable, IMO, if you used |
Member
|
hmm.. how would this be used? If it's intended to be used by userland code, then the |
Contributor
|
Been thinking about this sort of thing for a while, I think it would be best for every handle to have this sort of property in c++, accessible to JS, if possible. |
- using strictEqual in tests
Contributor
Author
|
@jasnell see this comment in the related PR. We probably should decide on one of those for a discussion thread since they are so similar. |
2 tasks
Fishrock123
added a commit
to Fishrock123/node
that referenced
this pull request
Apr 7, 2016
This allows third-party tools to check whether or not a handle that can be unreferenced is unreferenced at a particular time. Notably, this should be helpful for inspection via AsyncWrap. Also, this is useful even to node's internals, particularly timers. Refs: nodejs#5828 Refs: nodejs#5827 PR-URL: nodejs#5834 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Contributor
|
Closing this for the same reasons as #5828. |
evanlucas
pushed a commit
that referenced
this pull request
May 17, 2016
This allows third-party tools to check whether or not a handle that can be unreferenced is unreferenced at a particular time. Notably, this should be helpful for inspection via AsyncWrap. Also, this is useful even to node's internals, particularly timers. Refs: #5828 Refs: #5827 PR-URL: #5834 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
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
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.
Affected core subsystem
child_process
Description of change
_unreftofalsewhen child process is createdunref()orref()is invokedlib/net.jsR= @Fishrock123
R= @trevnorris