Conversation
After the (That's the most frequently asked question from #3335.) For example, would |
process.nextTick(function () { | ||
console.log('This will not run'); | ||
}); | ||
setTimeout(function () { |
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 rather wired, would it not be an idea to prevent process.nextTick
after the exit
event has emitted.
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.
Yeah, that's a good idea. exit should make nextTick a no-op.
@Mithgol nextTick was never a suitable idle listener. It'd be nice to add a @bnoordhuis Replied to two comments. Otherwise all good uncontroversial stuff, thanks. I'll update with that feedback. (Also, I think the maxTickDepth ought to be much higher, like 1000. It's just a loop, it's not THAT bad until it's really super excessive.) |
@bnoordhuis Fixed up with your comments. It'd be good to get another reviewer on this. @piscisaureus? |
} | ||
enter = Local<Function>::Cast(domain->Get(enter_symbol)); | ||
enter->Call(domain, 0, NULL); | ||
Local<Function> cb = Local<Function>::Cast(cb_v); |
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.
.As<Function>()
?
lgtm. Though it was hard to review since you've pushed many unrelated commits in one place :) |
@indutny You can review them individually at https://github.com/joyent/node/pull/3709/commits. They're all part of the same feature. I'll pull in teh |
Actually, I spoke too soon. It seems like this causes some huge problems with tls and domains, as a result of pulling MakeCallback into JS. Investigating. |
This needs to happen in smaller steps. Closing this. First step is to move MakeCallback to JS without breaking anything. |
Run nextTick callbacks right away.
Less dramatic speedup on http_simple, but still an improvement:
Event loop starvation is prevented responsibly, but it IS possible if you set the
process.maxTickDepth
to a very high number (likeInfinity
).Tests and docs included.