We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
LatestValueCache
1 parent 9797c28 commit f2f81d5Copy full SHA for f2f81d5
1 file changed
src/frequenz/channels/_latest_value_cache.py
@@ -53,6 +53,9 @@ class LatestValueCache(typing.Generic[T_co]):
53
54
It provides a way to look up the latest value in a stream without any delay,
55
as long as there has been one value received.
56
+
57
+ Takes ownership of the receiver. When the cache is stopped, the receiver
58
+ will be closed.
59
"""
60
61
def __init__(
@@ -109,6 +112,7 @@ async def _run(self) -> None:
109
112
110
113
async def stop(self) -> None:
111
114
"""Stop the cache."""
115
+ self._receiver.close()
116
if not self._task.done():
117
self._task.cancel()
118
try:
0 commit comments