summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwonderdogone <splicetv@gmail.com>2015-09-07 09:41:44 -0700
committerwonderdogone <splicetv@gmail.com>2015-09-07 09:41:44 -0700
commitf12bfd0ff92b2cc26b3a2863e16f86dcbe49d807 (patch)
tree7165c8846a2d2b85df2a97de8e056c2b8cb7dcc9
parenta56601a793e9eeb9090c77ca6f67e4ec1f8e4cf8 (diff)
downloadasync-f12bfd0ff92b2cc26b3a2863e16f86dcbe49d807.tar.gz
update docs to reflect setImmediate in example
as the example is using setImmediate, not nextTick
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
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 <sub>[(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js)</sub>
### 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: