Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
todd3834
on Sept 21, 2017
|
parent
|
context
|
favorite
| on:
Folding Promises in JavaScript
Wouldn’t this code only execute 1 promise at a time? I thought Promise.all allowed promises to be resolved in parallel
theprotocol
on Sept 21, 2017
|
next
[–]
Indeed. You most likely should do `await Promise.all` and then do the reduction.
dvlsg
on Sept 21, 2017
|
prev
|
next
[–]
If item is already a promise, and not a function returning a promise, they would be "executing" in parallel.
codefined
on Sept 21, 2017
|
prev
[–]
Sorry, in the sense of being identical to the original code in the linked post (reduce), not the comment.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: