mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
put_nowait
This commit is contained in:
parent
552bb93212
commit
52e117df3c
@ -36,7 +36,7 @@ class AioProcessNotifier:
|
|||||||
self.__queue: multiprocessing.queues.Queue = multiprocessing.Queue()
|
self.__queue: multiprocessing.queues.Queue = multiprocessing.Queue()
|
||||||
|
|
||||||
def notify(self) -> None:
|
def notify(self) -> None:
|
||||||
self.__queue.put(None)
|
self.__queue.put_nowait(None)
|
||||||
|
|
||||||
async def wait(self) -> None:
|
async def wait(self) -> None:
|
||||||
while not (await aiotools.run_async(self.__inner_wait)):
|
while not (await aiotools.run_async(self.__inner_wait)):
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
|
|||||||
self.join()
|
self.join()
|
||||||
|
|
||||||
def _queue_event(self, event: BaseEvent) -> None:
|
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:
|
def _ensure_write(self, report: bytes, reopen: bool=False, close: bool=False) -> bool:
|
||||||
if reopen:
|
if reopen:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user