MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _CancellationContext

Class _CancellationContext

pymongo/pool_shared.py:151–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149
150
151class _CancellationContext:
152 def __init__(self) -> None:
153 self._cancelled = False
154
155 def cancel(self) -> None:
156 """Cancel this context."""
157 self._cancelled = True
158
159 @property
160 def cancelled(self) -> bool:
161 """Was cancel called?"""
162 return self._cancelled
163
164
165async def _async_create_connection(address: _Address, options: PoolOptions) -> socket.socket:

Callers 6

__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
connectMethod · 0.90
__init__Method · 0.90
connectMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected