diff options
author | Maxim Devaev <[email protected]> | 2022-08-07 19:35:08 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-08-07 19:35:08 +0300 |
commit | e37a7254d5cf7e4cfa5dcfbbaf5b0e9d7474d154 (patch) | |
tree | c25210abfceb0da0725798105a389c5598694ff7 /kvmd/aiotools.py | |
parent | fdc3edfa799b21f04a83676459bab7a4e67b056f (diff) |
using shield_fg() in atomic (now atomic_fg)
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) |