- 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.
- 全屋互聯:智能家居系統開發指南
- Linux系統文件安全實戰全攻略
- WindowsServer2012Hyper-V虛擬化部署與管理指南
- 開源安全運維平臺OSSIM疑難解析:入門篇
- Windows Server 2012 Hyper-V Cookbook
- Moodle 3.x Teaching Techniques(Third Edition)
- Instant Optimizing Embedded Systems using Busybox
- Learning Magento 2 Administration
- Python UNIX和Linux系統管理指南
- Cassandra 3.x High Availability(Second Edition)
- Windows 8實戰從入門到精通(超值版)
- CentOS 6 Linux Server Cookbook
- Raspberry Pi入門指南
- Office 365 User Guide
- Unity AR/VR開發:實戰高手訓練營