In this recipe, we will learn the difference between a blocking operation and an asynchronous operation. This recipe is important because blocking operations serialize the execution of each operation on a single CPU. This is typically fine if the execution of each operation must be executed in serial order; however, if these operations can be executed in parallel, asynchronous programming can be a useful optimization, ensuring that, while an operation is waiting, others can still execute on the same CPU.
Blocking operations versus asynchronous programming
Getting ready
Before we begin, please ensure that all of the technical requirements are met, including installing Ubuntu 18.04 or higher and running the following in a terminal...