s
s
snc
Search…
s
s
snc
Introduction
Overview
Asyncronous Iterators Collection
Methods
each
eachParallelLimit
interval
waterfall
parallel
parallelLimit
forever
foreverParallel
now
times
forSync
all
Powered By
GitBook
foreverParallel
snc.foreverParallel(limit, callback(counter, done), callback_end(data))
Forever loop with parallel limit. Alternative name: fp.
1
snc
.
fp
(
2
,
(
counter
,
done
,
end
)
=>
{
2
console
.
log
(
counter
)
3
if
(
counter
<
6
)
{
4
setTimeout
(()
=>
{
5
done
()
6
},
3000
)
7
}
else
end
(
'bye!'
)
8
},
9
res
=>
{
10
console
.
log
(
`
END:
${
res
}
`
)
11
})
Copied!
1
-> 1
2
-> 2
3
-> 3 // Wait 3 seconds
4
-> 4 // Wait 3 seconds
5
-> 5 // Wait 6 seconds
6
-> 6 // Wait 6 seconds
7
-> 7 // Wait 9 seconds
8
-> END: bye bye! // Wait 9 seconds
Copied!
Methods - Previous
forever
Next - Methods
now
Last modified
1yr ago
Copy link