Process at most 10 pending responses from the thread pool in one go.
10 was chosen arbitrarily.
Test and report by Felix Geisendörfer <felix@debuggable.com>
This is actually undesireable as it takes away control from the user who
may want to pause/resume to throttle the upload stream, or synchronize
it with disk flushing.
I actually ran into memory issues when trying to stream huge files to
disc as the file module was building up a huge action buffer. This can
now easily be avoided like this:
part.addListener('body', function(chunk) {
req.pause();
file.write(chunk).addCallback(function() {
req.resume();
});
}
If you have a circular require chain in which one or more of the modules are
referenced with a ".." relative path, like require("../foo"), node blows up.
This patch un-blows-up that case. There still seem to be issues with
circularity, but this solves one of the more obnoxious ones.
This way let's us do deep comparison between object instances.
I have a suggestion for the sys.inherits function. Today it's impossible to
deep comparison between instance and class.
Take this snippet for example:
function ClassA() {}
function ClassB() {}
sys.inherits(ClassB, ClassA);
var instance = new ClassB();
The instance variable inherits from ClassA but we can't check it (which is
useful sometimes). You can compare the instance against ClassB
(instance.constructor == ClassB) but we can't compare it deeper
(instance.constructor.super == ClassA). The committed change simply assign
super to the super constructor instead of the super prototype.
I can't see any problem with this fix. You can still get the super constructor
by calling super_.prototype.
Express (my framework) uses them as a default
response body when non is present. Others
might use them for something as well.
Beats duplicating the list :D
This is not a bug in process.mixin, but I think it is undesirable
behavior. Right now process.mixin will not copy over keys with undefined
values. To me that is an unexpected filtering that should not happen
unless specifically called for.