MCPcopy Index your code
hub / github.com/dbcli/mycli / stop

Method stop

mycli/schema_prefetcher.py:67–73  ·  view source on GitHub ↗

Signal the background thread to stop and wait briefly for it.

(self, timeout: float = 2.0)

Source from the content-addressed store, hash-verified

65 self._loaded.clear()
66
67 def stop(self, timeout: float = 2.0) -> None:
68 """Signal the background thread to stop and wait briefly for it."""
69 if self._thread and self._thread.is_alive():
70 self._cancel.set()
71 self._thread.join(timeout=timeout)
72 self._cancel = threading.Event()
73 self._thread = None
74
75 def start_configured(self) -> None:
76 """Start prefetching based on the user's prefetch settings."""

Callers 6

prefetch_schema_nowMethod · 0.95
_startMethod · 0.95
closeMethod · 0.80
refresh_completionsMethod · 0.80

Calls 3

setMethod · 0.80
joinMethod · 0.80
is_aliveMethod · 0.45