- Hands-On Reactive Programming with Python
- Romain Picard
- 172字
- 2021-06-24 18:25:22
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.
- 樂(lè)學(xué)Windows操作系統(tǒng)
- 發(fā)布!設(shè)計(jì)與部署穩(wěn)定的分布式系統(tǒng)(第2版)
- Linux從零開(kāi)始學(xué)(視頻教學(xué)版)
- 白話區(qū)塊鏈
- RESS Essentials
- 移動(dòng)應(yīng)用UI設(shè)計(jì)模式(第2版)
- Linux系統(tǒng)安全基礎(chǔ):二進(jìn)制代碼安全性分析基礎(chǔ)與實(shí)踐
- AutoCAD 2014中文版從入門(mén)到精通
- Django Project Blueprints
- Building Telephony Systems With Asterisk
- Linux操作系統(tǒng)
- Ubuntu Linux操作系統(tǒng)實(shí)用教程
- 嵌入式微系統(tǒng)
- Mastering Sass
- Mastering Azure Serverless Computing