-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
lib,doc: return boolean from child.send() #3516
Conversation
Seems fine to me, is this Major? I can't imagine anyone doing anything other than |
A more cautious alternative is #3518. While this one updates the code to conform to the documentation, that one updates the documentation to conform to the code. Which is the right path? |
semver-minor IMO |
@@ -577,7 +577,7 @@ function setupChannel(target, channel) { | |||
handle: null, | |||
message: message, | |||
}); | |||
return; | |||
return this._handleQueue.length < (65536 * 2); |
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.
128k queued messages is perhaps a bit much. Maybe return false when the length is > 1?
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.
Sure. If the threshold is 1, I should probably add a test for that if it's possible to induce it without a ton of load or anything.
The documentation indicates that child.send() returns a boolean but it has returned undefinined at least since io.js v1. It now returns a boolean per the (slightly updated) documentation.
I'd agree with semver-minor as @rvagg indicates (which, of course, takes it out of the v4.x queue) |
@@ -577,7 +577,7 @@ function setupChannel(target, channel) { | |||
handle: null, | |||
message: message, | |||
}); | |||
return; | |||
return this._handleQueue.length < 1; |
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.
This is logically always false. :-)
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.
Doh! Fixed.
LGTM |
I'll land this and close #3518 in about six hours unless there's an objection. |
The documentation indicates that child.send() returns a boolean but it has returned undefinined at since v0.12.0. It now returns a boolean per the (slightly updated) documentation. PR-URL: #3516 Reviewed-By: Ben Noordhuis <[email protected]>
Landed in cdcf00a |
The documentation indicates that child.send() returns a boolean but it has returned undefinined at since v0.12.0. It now returns a boolean per the (slightly updated) documentation. PR-URL: nodejs#3516 Reviewed-By: Ben Noordhuis <[email protected]>
@nodejs/lts should we consider including this in v4.5.0? |
The documentation indicates that child.send() returns a boolean but it has returned undefinined at since v0.12.0. It now returns a boolean per the (slightly updated) documentation. PR-URL: nodejs#3516 Reviewed-By: Ben Noordhuis <[email protected]>
a soft -1 on LTS for this from me @thealphanerd |
The documentation indicates that child.send() returns a boolean but it
has returned
undefined
at least since io.js v1. This PR makes it so it returns aboolean per the (slightly updated) documentation.