DEV Community

Serial Promises vs Parallel Promises

Micah Riggan on March 30, 2019

In javascript we often need to do multiple asynchronous things. I'd like to use this post to show a few examples of doing things serially, and in ...
Collapse
 
dance2die profile image
Sung M. Kim

Thanks Micah.

I've never considered the implication of await and how it's used.
This opened up a new way on how to call async methods 🙂

Collapse
 
tunaxor profile image
Angel Daniel Munoz Gonzalez

Nice write up!

When async/await first came out people were posting samples without even thinking abusing await's is not good!

Note: At some point, you may attempt to do too many async things at once. Now you've got to determine how many you can do, and create batches of that size to prevent thrashing. That's a post for another time.

Mixing generators too perhaps :P?
I'll be waiting that post!

Collapse
 
jsn1nj4 profile image
Elliot Derhay

A Facebook user mentioned that the third example is missing the code. Just wanted to mention.

Collapse
 
micahriggan profile image
Micah Riggan • Edited

Thanks!

Edit: Fixed it