File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/service-library/src/servicelib Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11import asyncio
2- import contextlib
32import datetime
43import logging
54from collections import deque
98from functools import wraps
109from typing import TYPE_CHECKING , Any , ParamSpec , TypeVar
1110
11+ from common_library .async_tools import cancel_and_wait
12+
1213from . import tracing
1314from .utils_profiling_middleware import dont_profile , is_profiling , profile_context
1415
@@ -244,8 +245,5 @@ async def cancel_wait_task(
244245 up the cancellation. If None it waits forever.
245246 :raises TimeoutError: raised if cannot cancel the task.
246247 """
247-
248- task .cancel ()
249248 async with asyncio .timeout (max_delay ):
250- with contextlib .suppress (asyncio .CancelledError ):
251- await task
249+ await cancel_and_wait (task )
You can’t perform that action at this time.
0 commit comments