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

Method __init__

cassandra/io/twistedreactor.py:204–220  ·  view source on GitHub ↗

Initialization method. Note that we can't call reactor methods directly here because it's not thread-safe, so we schedule the reactor/connection stuff to be run from the event loop thread when it gets the chance.

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

202 return timer
203
204 def __init__(self, *args, **kwargs):
205 """
206 Initialization method.
207
208 Note that we can't call reactor methods directly here because
209 it's not thread-safe, so we schedule the reactor/connection
210 stuff to be run from the event loop thread when it gets the
211 chance.
212 """
213 Connection.__init__(self, *args, **kwargs)
214
215 self.is_closed = True
216 self.connector = None
217 self.transport = None
218
219 reactor.callFromThread(self.add_connection)
220 self._loop.maybe_start()
221
222 def _check_pyopenssl(self):
223 if self.ssl_context or self.ssl_options:

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
maybe_startMethod · 0.45

Tested by

no test coverage detected