parameters: (self)
docstring: Ensure the worker preemption thread is closed.
docstring_summary: Ensure the worker preemption thread is closed.
docstring_tokens: Ensure the worker preemption thread is closed .
function: def stop(self):
      """Ensure the worker preemption thread is closed."""
      self._should_preemption_thread_run = False
      with self._cluster_update_lock:
        self._cluster_due_for_update_or_finish.set()
function_tokens: def stop ( self ) : self . _should_preemption_thread_run = False with self . _cluster_update_lock : self . _cluster_due_for_update_or_finish . set ( )