diff options
Diffstat (limited to 'kvmd/aiotools.py')
-rw-r--r-- | kvmd/aiotools.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/aiotools.py b/kvmd/aiotools.py index 07981fde..4f05501c 100644 --- a/kvmd/aiotools.py +++ b/kvmd/aiotools.py @@ -125,10 +125,10 @@ def shield_fg(aw: Awaitable): # type: ignore return outer -def atomic(func: _FunctionT) -> _FunctionT: +def atomic_fg(func: _FunctionT) -> _FunctionT: @functools.wraps(func) async def wrapper(*args: Any, **kwargs: Any) -> Any: - return (await asyncio.shield(func(*args, **kwargs))) + return (await shield_fg(func(*args, **kwargs))) return typing.cast(_FunctionT, wrapper) |