class Solargraph::LanguageServer::Host::Cataloger

def initialize host

def initialize host
  @host = host
  @mutex = Mutex.new
  @stopped = true
  @pings = []
end

def ping

Returns:
  • (void) -
def ping
  mutex.synchronize { pings.push nil }
end

def start

Returns:
  • (void) -
def start
  return unless stopped?
  @stopped = false
  Thread.new do
    until stopped?
      sleep 0.1
      next if pings.empty?
      mutex.synchronize do
        host.catalog
        pings.clear
      end
    end
  end
end

def stop

Returns:
  • (void) -
def stop
  @stopped = true
end

def stopped?

Returns:
  • (Boolean) -
def stopped?
  @stopped
end

def synchronizing?

def synchronizing?
  !pings.empty?
end