Concurrency and Parallelism in RxPY

The previous chapters covered asynchronous programming principles, the difference between CPU operations and I/O operations, and how to create observables. Chapter 2Asynchronous Programming in Python, detailed the two patterns that allow us to handle concurrency, and which is most adapted to which use case. Unfortunately real life, and so coding, is rarely Boolean; sometimes an asynchronous application also has to deal with CPU-intensive operations, or even worse, blocking code. This chapter details how ReactiveX allows us to handle such situations, with tools that are easy to use and efficient, such as schedulers. The first part of this chapter is a reminder of the concurrency issues that can happen, and how schedulers can solve these issues. The second part details the schedulers available in RxPY, and when and how to use them.

The following topics will be covered in this chapter:

  • Concurrency and schedulers
  • Available schedulers
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.96.94