From f12bfd0ff92b2cc26b3a2863e16f86dcbe49d807 Mon Sep 17 00:00:00 2001 From: wonderdogone Date: Mon, 7 Sep 2015 09:41:44 -0700 Subject: update docs to reflect setImmediate in example as the example is using setImmediate, not nextTick --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e80466e..c309cf7 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ missing please create a GitHub issue for it. ## Common Pitfalls [(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js) ### Synchronous iteration functions -If you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.nextTick` to start a new call stack on the next tick of the event loop. +If you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.setImmediate` to start a new call stack on the next tick of the event loop. This can also arise by accident if you callback early in certain cases: -- cgit v1.2.1