summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-03-04 00:26:45 +0300
committerDevaev Maxim <[email protected]>2020-03-04 00:26:45 +0300
commit52e117df3c1fbfc29524ca9d06e49605b3ec5992 (patch)
treef024bae0dbb6dc08c4cdaae607faedee0eceb5c2
parent552bb93212ef2a890b1493b2d9be022d3ece802b (diff)
put_nowait
-rw-r--r--kvmd/aiomulti.py2
-rw-r--r--kvmd/plugins/hid/otg/device.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/aiomulti.py b/kvmd/aiomulti.py
index fc3724dd..9ff60d4c 100644
--- a/kvmd/aiomulti.py
+++ b/kvmd/aiomulti.py
@@ -36,7 +36,7 @@ class AioProcessNotifier:
self.__queue: multiprocessing.queues.Queue = multiprocessing.Queue()
def notify(self) -> None:
- self.__queue.put(None)
+ self.__queue.put_nowait(None)
async def wait(self) -> None:
while not (await aiotools.run_async(self.__inner_wait)):
diff --git a/kvmd/plugins/hid/otg/device.py b/kvmd/plugins/hid/otg/device.py
index 37cb7b07..2986ce4e 100644
--- a/kvmd/plugins/hid/otg/device.py
+++ b/kvmd/plugins/hid/otg/device.py
@@ -124,7 +124,7 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
self.join()
def _queue_event(self, event: BaseEvent) -> None:
- self.__events_queue.put(event)
+ self.__events_queue.put_nowait(event)
def _ensure_write(self, report: bytes, reopen: bool=False, close: bool=False) -> bool:
if reopen: