setImmediate instead of nextTick for node >=0.10 #122

Merged
merged 1 commit into from Jul 30, 2013

Projects

None yet

2 participants

@azylman
Contributor
azylman commented Jul 29, 2013

You're supposed to use setImmediate in node >=0.10 instead of process.nextTick. The test cases were only passing because none of them tested on more documents than process.maxTickDepth (by default 1000). If you run on more documents than that, it crashes with RangeError: maximum call stack size exceeded.

I artificially lowered process.maxTickDepth in one of the test cases to generate a failing test case, then changed all instances of process.nextTick to use setImmediate where available and verified that the test cases are passing again.

I didn't submit any of the compiled js because my version of coffee-script is different than your's so there were a lot of diffs that were just white noise.

@wdavidw wdavidw merged commit 1894c48 into wdavidw:master Jul 30, 2013

1 check passed

default The Travis CI build passed
Details
@wdavidw
Owner
wdavidw commented Jul 30, 2013

Excellent catch and thanks for the clean commit

@wdavidw wdavidw added a commit that referenced this pull request Jul 30, 2013
@wdavidw Generate js code from issue #122 bdab8f7
@wdavidw
Owner
wdavidw commented Jul 30, 2013

A new version is published with your changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment