Asynchronous task
is a non-blocking task. Main thread goes back to the thread pool (and free to do other tasks) when it reaches to await – and new thread is assigned when wait is complete.
It is different from the multi-threading. In multi-threding, task is divided between multiple threads. Cores of your CPU are utilized.
Analogy
Let’s say you have some chores like:
- Boiling eggs 🫕 (or sweet potatoes🍠🍠 if you dont eat eggs 🥚🥚)
- Clean 🧹🪣 the house
There are multiple ways to achieve this:
[Read More]