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

@@ -218,7 +218,7 @@ class MsdFileReader(BaseMsdReader): # pylint: disable=too-many-instance-attribu
now = time.monotonic()
if self.__tick + 1 < now or self.__readed == self.__file_size:
self.__tick = now
await self.__notifier.notify()
self.__notifier.notify()
yield chunk
@@ -277,7 +277,7 @@ class MsdFileWriter(BaseMsdWriter): # pylint: disable=too-many-instance-attribu
now = time.monotonic()
if self.__tick + 1 < now:
self.__tick = now
await self.__notifier.notify()
self.__notifier.notify()
return self.__written