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

Method __init__

cassandra/io/asyncorereactor.py:212–230  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

210 _loop_dispatch_class = _AsyncorePipeDispatcher if os.name != 'nt' else _BusyWaitDispatcher
211
212 def __init__(self):
213 self._pid = os.getpid()
214 self._loop_lock = Lock()
215 self._started = False
216 self._shutdown = False
217
218 self._thread = None
219
220 self._timers = TimerManager()
221
222 try:
223 dispatcher = self._loop_dispatch_class()
224 dispatcher.validate()
225 log.debug("Validated loop dispatch with %s", self._loop_dispatch_class)
226 except Exception:
227 log.exception("Failed validating loop dispatch with %s. Using busy wait execution instead.", self._loop_dispatch_class)
228 dispatcher.close()
229 dispatcher = _BusyWaitDispatcher()
230 self._loop_dispatcher = dispatcher
231
232 def maybe_start(self):
233 should_start = False

Callers

nothing calls this directly

Calls 4

TimerManagerClass · 0.90
_BusyWaitDispatcherClass · 0.85
validateMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected