MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / _clean_tasks

Method _clean_tasks

asyncpg/connection.py:1620–1627  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1618 self._clean_tasks()
1619
1620 def _clean_tasks(self):
1621 # Wrap-up any remaining tasks associated with this connection.
1622 if self._cancellations:
1623 current = asyncio.current_task(self._loop)
1624 for fut in self._cancellations:
1625 if fut is not current and not fut.done():
1626 fut.cancel()
1627 self._cancellations.clear()
1628
1629 def _check_open(self):
1630 if self.is_closed():

Callers 1

_cleanupMethod · 0.95

Calls 2

clearMethod · 0.80
cancelMethod · 0.45

Tested by

no test coverage detected