Asynchronous Programming

What is Asynchronous Programming?

  • An asynchronous model allows multiple things to happen at the same time

  • An asynchronous operation is one that allows the computer to “move on” to other tasks while waiting for the asynchronous operation to complete

  • Asynchronous programming means that time-consuming operations don’t have to bring everything else in our programs to a halt

  • When you start an action, your program continues to run. When the action finishes, the program is informed and gets access to the result


Examples of Asynchronous Operations

  • Program making an API request to another service

  • Program making a database request

  • Program making a time-consuming complex calculation

  • Program running a large batch operation (i.e. sending out weekly newsletter only to customers that have opted in)