Skip to content

Commit

Permalink
fix Value.notify
Browse files Browse the repository at this point in the history
  • Loading branch information
Günther Jena committed Sep 28, 2022
1 parent 459933c commit 3483b76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## next version
## 2.5.0

* fixed typo ("orginator" fixed to "origintator")
* add log output for default error_handler
* add `dependent_subscribe` function for `Values`
* Remove OperatorFactory logic from operators

## 2.4.0

Expand Down Expand Up @@ -58,4 +59,4 @@

* rename `default_error_handler.py` to `error_handler.py`
* added `BitwiseCombineLatest` and `map_bit`
* fixing typing warnings
* fixing typing warnings
4 changes: 3 additions & 1 deletion broqer/value.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def emit(self, value: Any,

return Publisher.notify(self, value)

notify = Publisher.notify


def dependent_subscribe(publisher: Publisher, value: Value):
""" Let `value` subscribe to `publisher` only when `value` itself is subscribed
Expand All @@ -42,4 +44,4 @@ def _on_subscription(existing_subscription: bool):
else:
publisher.unsubscribe(value)

value.register_on_subscription_callback(_on_subscription)
value.register_on_subscription_callback(_on_subscription)

0 comments on commit 3483b76

Please sign in to comment.