Skip to main content

Asynchronous Vs Multithreading

 Differences between Async and Multithreading programming models:

  1. Async is based on Non-Blocking execution of tasks, while multithreading is about concurrent executions of different tasks.
  2. Async can be done with single threaded environment as well as multi threaded environment. So in a nutshell multithreading is one form of Async programming.
  3. Example is Node Js being a single threaded runtime environment can handle async programming.
  4. Way to achieve async functionality is, have a function, call the slow executing task and pass a callback function to it (that should be called after the task execution). and let the control come back just after calling the async function and then execute the next set of instruction or call. While to achieve multithreading is to have multiple threads working on different sets of tasks.

These are just a few differences that we can see on an initial look.

I focused on simplest and shortest differences that I could feel, needed to be highlighted. there's ton of information available if you want to learn more.

Here is the reference article.



Comments