experimental edge mode

This commit is contained in:
Devaev Maxim
2020-09-10 12:33:26 +03:00
parent 23ad910606
commit 1d98f5ed04
4 changed files with 62 additions and 6 deletions

View File

@@ -97,6 +97,9 @@ class AioNotifier:
async def notify(self) -> None:
await self.__queue.put(None)
def notify_sync(self) -> None:
self.__queue.put_nowait(None)
async def wait(self) -> None:
await self.__queue.get()
while not self.__queue.empty():