Книга: Learning Concurrency in Python
Назад: Example
Дальше: Combining observables

Output

You'll see in the output of our program that all three subscribers receive all three of our news events before finally receiving the completed emission:

$ python3.6 14_multicasting.py
Subscriber: Grant Received: 211
Subscriber: Barry Received: 211
Subscriber: Sophie Received: 211
Subscriber: Grant Received: 7120
Subscriber: Barry Received: 7120
Subscriber: Sophie Received: 7120
Subscriber: Grant Received: 2802
Subscriber: Barry Received: 2802
Subscriber: Sophie Received: 2802
Subscriber: Grant Received Events
Subscriber: Barry Received Events
Subscriber: Sophie Received Events
Назад: Example
Дальше: Combining observables