New answers tagged

1

This is not an anti-pattern. This is a code smell, which is to say that this is the sort of thing you should avoid when it's feasible to do so, but there may be legitimate cases where nothing else does the job. I thought the Promise.all should fail fast. Yup. This is exactly why the default behavior of Promise.all is to fail fast. The rationale ...


3

The main problem seems to be where to branch and where to join asynchronous executions. In your sample code you're trying to use a single point to join non-dependent operations. The trick here is to use many branches and joins; say you have an array of projects, and load teams. Then you have a list of promises, and for each you will start a new branch and ...



Top 50 recent answers are included