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

Creating observables

Most of the code of a ReactiveX application is composed of operators that are chained together. However, at some point, the source of these events must be exposed as observables. ReactiveX provides many ways to create an observable from any source of data. Many factory operators are already available to convert virtually any source of data or event to an observable, and, should none of these operators be applicable to a situation, it is possible to create an operator from custom code logic.

All of the factory operators in RxPY are implemented as static methods of the Observable class. This means that they are invoked by using Observable.xxx, where xxx is the factory operator, and they return an observable. Also, almost all of these operators take a scheduler as an optional parameter. A scheduler allows you to control how the items are emitted on the observable. They are only mentioned in this chapter briefly, and they will be covered in detail in Chapter 5, Concurrency and Paralellism in RxPY.

主站蜘蛛池模板: 申扎县| 盐源县| 吉安市| 上犹县| 宝应县| 阿瓦提县| 府谷县| 绥德县| 金乡县| 平泉县| 吉隆县| 广昌县| 健康| 博爱县| 峨边| 黎川县| 亚东县| 阳高县| 临湘市| 都安| 崇礼县| 丽水市| 伊宁县| 岱山县| 团风县| 车致| 潮安县| 瓮安县| 孙吴县| 宁德市| 南江县| 西乡县| 顺平县| 突泉县| 淮安市| 札达县| 大足县| 淮阳县| 山东省| 建湖县| 南开区|