February 2019
Intermediate to advanced
672 pages
16h 50m
English
In the first example in this chapter, you saw that asynchronous programming can provide our Python programs with better execution time, but that is not always the case. Asynchronous programming alone can only provide improvements in speed if all processing tasks are non-blocking. However, similar to the comparison between concurrency and inherent sequentiality in programming tasks, some computing tasks in Python are inherently blocking, and therefore, they cannot be taken advantage of by asynchronous programming.
This means that if your asynchronous programming has inherently blocking tasks in some coroutines, the program will not gain any additional improvement in speed from the asynchronous architecture. While ...