Skip to content
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

setImmediate instead of nextTick for node >=0.10 #122

Merged
merged 1 commit into from
Jul 30, 2013

Conversation

azylman
Copy link
Contributor

@azylman 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 added a commit that referenced this pull request Jul 30, 2013
setImmediate instead of nextTick for node >=0.10
@wdavidw wdavidw merged commit 1894c48 into adaltas:master Jul 30, 2013
@wdavidw
Copy link
Member

wdavidw commented Jul 30, 2013

Excellent catch and thanks for the clean commit

wdavidw added a commit that referenced this pull request Jul 30, 2013
@wdavidw
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants