Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
todd3834
· 9y ago · 0 comments
Wouldn’t this code only execute 1 promise at a time? I thought Promise.all allowed promises to be resolved in parallel
Comments
[–]
theprotocol
9y ago
Indeed. You most likely should do `await Promise.all` and then do the reduction.
[–]
dvlsg
9y ago
If item is already a promise, and not a function returning a promise, they would be "executing" in parallel.
[–]
codefined
9y ago
Sorry, in the sense of being identical to the original code in the linked post (reduce), not the comment.