Skip to content

Commit

Permalink
Docs: add another example for when not to use no-await-in-loop (#10714)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 authored and platinumazure committed Aug 2, 2018
1 parent 6e78b7d commit 863aa78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/rules/no-await-in-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ async function foo(things) {

In many cases the iterations of a loop are not actually independent of each-other. For example, the
output of one iteration might be used as the input to another. Or, loops may be used to retry
asynchronous operations that were unsuccessful. In such cases it makes sense to use `await` within a
asynchronous operations that were unsuccessful. Or, loops may be used to prevent your code from sending
an excessive amount of requests in parallel. In such cases it makes sense to use `await` within a
loop and it is recommended to disable the rule via a standard ESLint disable comment.

0 comments on commit 863aa78

Please sign in to comment.