MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / close

Method close

cassandra/io/asyncioreactor.py:125–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

123 return AsyncioTimer(timeout, callback, loop=cls._loop)
124
125 def close(self):
126 with self.lock:
127 if self.is_closed:
128 return
129 self.is_closed = True
130
131 # close from the loop thread to avoid races when removing file
132 # descriptors
133 asyncio.run_coroutine_threadsafe(
134 self._close(), loop=self._loop
135 )
136
137 async def _close(self):
138 log.debug("Closing connection (%s) to %s" % (id(self), self.endpoint))

Callers 2

handle_readMethod · 0.95
_closeMethod · 0.45

Calls 1

_closeMethod · 0.95

Tested by

no test coverage detected