simplified AioNotifier()

This commit is contained in:
Maxim Devaev
2022-08-07 19:04:32 +03:00
parent aa630988cc
commit ec9785b4be
18 changed files with 43 additions and 54 deletions

View File

@@ -107,7 +107,7 @@ class AioReader: # pylint: disable=too-many-instance-attributes
)
for (pin, value) in zip(pins, lines.get_values())
}
self.__loop.call_soon_threadsafe(self.__notifier.notify_sync)
self.__loop.call_soon_threadsafe(self.__notifier.notify)
while not self.__stop_event.is_set():
ev_lines = lines.event_wait(1)
@@ -170,5 +170,5 @@ class _DebouncedValue:
value = await self.__queue.get()
if self.__value != value:
self.__value = value
await self.__notifier.notify()
self.__notifier.notify()
await asyncio.sleep(self.__debounce)