MCPcopy
hub / github.com/psf/black / cancel

Function cancel

src/black/concurrency.py:50–54  ·  view source on GitHub ↗

asyncio signal handler that cancels all `tasks` and reports to stderr.

(tasks: Iterable[asyncio.Future[Any]])

Source from the content-addressed store, hash-verified

48
49
50def cancel(tasks: Iterable[asyncio.Future[Any]]) -> None:
51 """asyncio signal handler that cancels all `tasks` and reports to stderr."""
52 err("Aborted!")
53 for task in tasks:
54 task.cancel()
55
56
57def shutdown(loop: asyncio.AbstractEventLoop) -> None:

Callers

nothing calls this directly

Calls 1

errFunction · 0.90

Tested by

no test coverage detected