fix: preserve real cancellation in MCP paths
This commit is contained in:
1 parent
07ad0bafa8
commit
d4f5abe004
5 files changed
+80
-9
No files matched your search
@@ -0,0 +1,10 @@
|
||||
"""Async cancellation helpers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
||||
|
||||
def task_is_cancelling() -> bool:
|
||||
task = asyncio.current_task()
|
||||
return task is not None and task.cancelling() > 0
|
||||
Reference in new issue
Block a user