MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / maybe_start

Method maybe_start

cassandra/io/libevreactor.py:85–100  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 self._loop_timer = libev.Timer(self._loop, self._on_loop_timer)
84
85 def maybe_start(self):
86 should_start = False
87 with self._lock:
88 if not self._started:
89 log.debug("Starting libev event loop")
90 self._started = True
91 should_start = True
92
93 if should_start:
94 with self._lock_thread:
95 if not self._shutdown:
96 self._thread = Thread(target=self._run_loop, name="event_loop")
97 self._thread.daemon = True
98 self._thread.start()
99
100 self._notifier.send()
101
102 def _run_loop(self):
103 while True:

Callers 1

__init__Method · 0.45

Calls 1

startMethod · 0.45

Tested by

no test coverage detected