October 2018
Intermediate to advanced
420 pages
10h 26m
English
Chapter 5, Concurrency and Parallelism in RxPY, detailed the use of multithreading to handle CPU-bound operations such as audio encoding. It also explained the limitations of this model with Python code, which was due to the limitations implied by the GIL. Python has never been good at multithreading, and will probably never be. However, in web applications or microservices, this is not necessarily an issue. Instead of using multithreading to deal with CPU bound operations, it is possible to use multiprocessing.
With multithreading, only one instance of the service is running, and this service uses multithreading to parallelize task executions. With multiprocessing, several single-threaded instances ...
Read now
Unlock full access