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

Method __init__

cassandra/io/asyncorereactor.py:349–371  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

347 return timer
348
349 def __init__(self, *args, **kwargs):
350 Connection.__init__(self, *args, **kwargs)
351
352 self.deque = deque()
353 self.deque_lock = Lock()
354
355 self._connect_socket()
356
357 # start the event loop if needed
358 _global_loop.maybe_start()
359
360 init_handler = WaitableTimer(
361 timeout=0,
362 callback=partial(asyncore.dispatcher.__init__,
363 self, self._socket, _dispatcher_map)
364 )
365 _global_loop.add_timer(init_handler)
366 init_handler.wait(kwargs["connect_timeout"])
367
368 self._writable = True
369 self._readable = True
370
371 self._send_options_message()
372
373 def close(self):
374 with self.lock:

Callers

nothing calls this directly

Calls 7

waitMethod · 0.95
WaitableTimerClass · 0.85
_connect_socketMethod · 0.80
_send_options_messageMethod · 0.80
__init__Method · 0.45
maybe_startMethod · 0.45
add_timerMethod · 0.45

Tested by

no test coverage detected