diff options
author | Graeme Yeates <yeatesgraeme@gmail.com> | 2015-09-07 12:51:24 -0400 |
---|---|---|
committer | Graeme Yeates <yeatesgraeme@gmail.com> | 2015-09-07 12:51:24 -0400 |
commit | 6a1d6d29ce9e2c38fcc87a7815787f8fc7c12d73 (patch) | |
tree | 7165c8846a2d2b85df2a97de8e056c2b8cb7dcc9 | |
parent | a56601a793e9eeb9090c77ca6f67e4ec1f8e4cf8 (diff) | |
parent | f12bfd0ff92b2cc26b3a2863e16f86dcbe49d807 (diff) | |
download | async-6a1d6d29ce9e2c38fcc87a7815787f8fc7c12d73.tar.gz |
Merge pull request #903 from wonderdogone/master
update docs to reflect setImmediate in example
-rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |