Asynchronous programming.

You have probably seen this term before, but what does it actually mean?

Let's explain.

👇🧵
Let's go back to our pizza restaurant! 🇮🇹

Let's say a customer orders a pizza. You tell him it will probably take 30 min to arrive.

You make the fresh pizza and put it in the oven. This will probably take 15 minutes to finish. 🍕
So what do you do in those 15 minutes that the pizza is in the oven?

Should you wait 15 minutes for the pizza to finish and do nothing during that time?

That obviously isn't very efficient. So you start cleaning up the kitchen instead, while the pizza is in the oven. 🧹
The same thing is happening with asynchronous programming.

While a certain task is getting executed, your software is capable of doing other things in the meantime instead of waiting for that one task to finish. 🚀
In general, asynchronous programming makes your software more efficient when it comes to using resources.

In web environments, for example, this is very important to be able to serve the requests of many users with the least amount of resources.
You can follow @rafrasenberg.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.