Another option, which may prevent recursive starvation, would be to process all the nextTicks at the end of the current tick, but any additional nextTicks added in that pass would wait a bit.
On Sun, May 27, 2012 at 1:43 AM, Jorge <[email protected]> wrote: > And the proper name IMO would be *this*Tick not *next*Tick :-P It's too late to change it, and adding additional API would be worse. The way people think it works is "run this function immediately after the current code has run to completion," which is what it would do. > And perhaps it should be internal, not part of the public API: _thisTick(). > But that depends: exactly *where* have you seen the problem you mention, @izs? lib/http.js
