- Hands-On Reactive Programming with Python
- Romain Picard
- 62字
- 2021-06-24 18:25:20
Solving the cycle issue with Subject
Now let's see how to use Subject to implement the directed cyclic graph of the previous example. Instead of referencing the a_out variable directly, Subject is used:
b_in_proxy = Subject()
b_out = component_b(b_in_proxy)
a_out = component_a(b_out)
a_out.subscribe(b_in_proxy)
The complete code of this example is available at: https://github.com/PacktPublishing/Hands-On-Reactive-Programming-with-Python in the cycle_subject.py script.
推薦閱讀
- Linux系統架構與運維實戰
- Linux操作系統基礎
- 阿里云數字新基建系列:云原生操作系統Kubernetes
- 精通Linux內核開發
- Implementing Azure DevOps Solutions
- Alfresco 4 Enterprise Content Management Implementation
- 無蘋果不生活 The New iPad隨身寶典
- 計算機系統:基于x86+Linux平臺
- RHCSARHCE 紅帽Linux認證學習指南(第7版)EX200 & EX300
- 計算機應用基礎(Windows 7+Office 2016)
- INSTANT Galleria Howto
- Hands-On GPU Programming with Python and CUDA
- iOS 10 開發指南
- Implementing Domain-Specific Languages with Xtext and Xtend(Second Edition)
- BuddyPress Theme Development