class Solargraph::LanguageServer::Host::Cataloger
def initialize host
def initialize host @host = host @mutex = Mutex.new @stopped = true @pings = [] end
def ping
-
(void)-
def ping mutex.synchronize { pings.push nil } end
def start
-
(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
-
(void)-
def stop @stopped = true end
def stopped?
-
(Boolean)-
def stopped? @stopped end
def synchronizing?
def synchronizing? !pings.empty? end