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

Class _Atomic

asyncpg/connection.py:2696–2709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2694
2695
2696class _Atomic:
2697 __slots__ = ('_acquired',)
2698
2699 def __init__(self):
2700 self._acquired = 0
2701
2702 def __enter__(self):
2703 if self._acquired:
2704 raise exceptions.InterfaceError(
2705 'cannot perform operation: another operation is in progress')
2706 self._acquired = 1
2707
2708 def __exit__(self, t, e, tb):
2709 self._acquired = 0
2710
2711
2712class _ConnectionProxy:

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected