# File lib/listen/adapter.rb, line 108
    def stop
      mutex.synchronize do
        return if stopped
        @stopped = true
        turnstile.signal # ensure no thread is blocked
      end

      worker.stop if worker
      Thread.kill(worker_thread) if worker_thread
      poller_thread.join if poller_thread
    end