I have an array of promises that need to run in sequential order.
var promises = [promise1, promise2, ..., promiseN];
Calling RSVP.all will execute them in parallel:
RSVP.all(promises).then(...);
But, how can I run them in sequence?
I can manually stack them like this
RSVP.resolve()
.then(promise1)
.then(promise2)
...
.then(promiseN)
.then(...);
but the problem is that the number of promises varies and array of promises is built dynamically.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…