Skip to content

Conversation

mark-kubacki
Copy link

Subscribe to all change notifications and -indications in one go, then wait out the subscription duration centrally once and not sequentially for every individually.

This helps the user get an idea which value changes are perhaps related—for example, sound level and (car) distance reading, or temperature and humidity.

In this case the context was used as connect timeout, not a parent
context to terminate the entire application. I have introduced the
latter to show the different uses.
It is perfectly fine to subscribe to all services at once and wait once.
Previously, on disconnects the example would not even proceed to showing
more than one subscription.
Since we subscribe to all change notifications and -indications in one go to
receive them concurrently, annotate every output line to help tell its origin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant