mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 11:01:53 +08:00
simplified AioNotifier()
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user