October 2018
Intermediate to advanced
420 pages
10h 26m
English
There are two possible ways to deal with CPU-bound operations:
For now, the multithreading solution will be investigated. More details on how to solve it with multiprocessing will be provided in Chapter 10, Testing and Debugging.
As explained in Chapter 5, Concurrency and Parallelism in RxPY, two operators allow us to deal with schedulers and execution contexts: observe_on and subscribe_on. In the case of this application, ThreadPoolScheduler can be used. Since the encoding requests use a lot of CPU, and they can run in parallel, a thread pool can be used to execute ...