- 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服務器(第4版)
- Linux操作系統基礎
- Linux從零開始學(視頻教學版)
- Persistence in PHP with the Doctrine ORM
- 深入Linux內核架構與底層原理(第2版)
- Windows Server 2019 Administration Fundamentals
- Linux自動化運維:Shell與Ansible(微課版)
- 直播系統開發:基于Nginx與Nginx-rtmp-module
- ElasticSearch Cookbook
- Windows 7實戰從入門到精通
- Learning Continuous Integration with Jenkins(Second Edition)
- iOS 10快速開發:18天零基礎開發一個商業應用
- OpenStack Essentials(Second Edition)
- 鴻蒙HarmonyOS應用開發入門
- Administering ArcGIS for Server