4 ms·
`async/await` is only for sequencing, it's not gonna replace anything other than `.then` chains. If you have such chains to the extent that you think `async/awa
by esailija 12y ago
`async/await` is only for sequencing, it's not gonna replace anything other than `.then` chains. If you have such chains to the extent that you think `async/await` will solve your problems, you should think very hard if every item in the chain is truly depending on the previous item in the chain because you are currently losing a lot of performance to that otherwise. I have often seen examples using generators and `async await` that needlessly turn fast concurrent promise code into slower sequential code.
- nawitus 12y agoYou can sequence multiple async operations with promises quite easily by using Q.all (of course this depends on the promise library you're using). Even if async/await will only replace .then chains, that already fixes most of the issues. Most async code actually consists of .then chains (or just a single async function call). Anyway, I agree with your point. Developers need to understand how to use async/await correctly. I wonder if async/await could be implemented for grouping multiple async operations together..