File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,15 @@ class FileWatcher(Receiver[Event]):
7070 the [`path`][frequenz.channels.file_watcher.Event.path] where the change was
7171 observed.
7272
73+ Note:
74+ The owner of the [`FileWatcher`][frequenz.channels.file_watcher.FileWatcher]
75+ receiver is responsible for recreating the `FileWatcher` after it has been
76+ cancelled or stopped.
77+ For example, if a [`Task`][asyncio.Task] uses an asynchronous iterator to consume
78+ events from the `FileWatcher` and the task is cancelled, the `FileWatcher` will
79+ also stop. Therefore, the same `FileWatcher` instance cannot be reused for a new
80+ task to consume events. In this case, a new FileWatcher instance must be created.
81+
7382 # Event Types
7483
7584 The following event types are available:
You can’t perform that action at this time.
0 commit comments