# frozen_string_literal: false
Copyright (c) 2000 Masatoshi SEKI
@queue = Thread::Queue.new
return server if server && server.alive? # server may be `false'
invoke_service_command(name, @@command[name])
def invoke_service_command(name, command)
raise "invalid command. name: #{name}" unless command
return if @servers.include?(name)
if command.respond_to? :to_ary
command = command.to_ary + [uri, name]
pid = spawn("#{command} #{uri} #{name}")