官术网_书友最值得收藏!

Exploring Observables and Observers

In this chapter, we will go into detail on observables: how to create them, how to subscribe to them, how to handle their errors, and how to use them with AsyncIO. In the first part of this chapter, we will describe all of the possible ways to create observables, from existing objects, iterable objects, or custom code logic. Each time a new observable is needed, one of these methods is best for the situation.

In the second part of this chapter, we will explain another important notion of ReactiveX: hot and cold observables. Knowing whether an observable is hot or cold is the key to using it correctly. The third part of this chapter will cover the different ways to listen to an observable and how to deal with errors. Finally, the last part will illustrate how observables can cohabit with AsyncIO and how to bridge futures and observables. This is a frequent requirement when writing drivers based on AsyncIO packages.

The following topics will be covered in this chapter:

  • Creating observables
  • Hot and cold observables
  • Subscription and disposal
  • Error handling
  • Observables and AsyncIO
主站蜘蛛池模板: 亚东县| 隆林| 五峰| 黔西| 蒲江县| 红安县| 平安县| 铜川市| 全南县| 五家渠市| 巧家县| 肥城市| 麦盖提县| 奉节县| 沭阳县| 绿春县| 阿尔山市| 万山特区| 庆安县| 泸西县| 定兴县| 疏勒县| 仙居县| 开平市| 榕江县| 苗栗市| 浮山县| 肇州县| 方城县| 沙田区| 建平县| 垦利县| 渝中区| 饶平县| 古丈县| 贵港市| 通山县| 宁海县| 灵丘县| 望都县| 鹤山市|