fix: preserve real cancellation in MCP paths

This commit is contained in:
adabarbulescu authored and Xubin Ren committed 2026-07-18 17:36:35 +08:00
1 parent 07ad0bafa8
commit d4f5abe004
5 files changed
+80 -9

No files matched your search

+10
View File
@@ -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