|
|
|
|
|
by Macha
3430 days ago
|
|
If the ordering is important, then you should be using a()
.then(()=>b())
.then(()=>c())
Assuming anything about the completion order of: a():
b();
c();
Where a, b and c are async tasks of any kind (be they classic old callbacks, Promises, Observables, whatever) is just asking for trouble. The whole point is that you don't care about when it finishes, you just want to know that it has finished. If the order is that important and you don't want to handle managing it, you should just write standard synchronous code. |
|