using shield_fg() in atomic (now atomic_fg)

This commit is contained in:
Maxim Devaev
2022-08-07 19:35:08 +03:00
parent fdc3edfa79
commit e37a7254d5
10 changed files with 30 additions and 30 deletions

View File

@@ -234,7 +234,7 @@ class BaseMcuHid(BaseHid, multiprocessing.Process): # pylint: disable=too-many-
async def reset(self) -> None:
self.__reset_required_event.set()
@aiotools.atomic
@aiotools.atomic_fg
async def cleanup(self) -> None:
if self.is_alive():
get_logger(0).info("Stopping HID daemon ...")

View File

@@ -164,7 +164,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
self.clear_events()
self.__server.queue_event(ResetEvent())
@aiotools.atomic
@aiotools.atomic_fg
async def cleanup(self) -> None:
if self.__proc is not None:
if self.__proc.is_alive():