class ServerEngine::MultiThreadServer::WorkerMonitor

Public Class Methods

new(worker, thread) click to toggle source
# File lib/serverengine/multi_thread_server.rb, line 39
def initialize(worker, thread)
  @worker = worker
  @thread = thread
end

Public Instance Methods

alive?() click to toggle source
# File lib/serverengine/multi_thread_server.rb, line 70
def alive?
  @thread.alive?
end
join() click to toggle source
# File lib/serverengine/multi_thread_server.rb, line 66
def join
  @thread.join
end
recoverable?() click to toggle source
# File lib/serverengine/multi_thread_server.rb, line 74
def recoverable?
  true
end
send_reload() click to toggle source
# File lib/serverengine/multi_thread_server.rb, line 55
def send_reload
  Thread.new do
    begin
      @worker.reload
    rescue => e
      ServerEngine.dump_uncaught_error(e)
    end
  end
  nil
end
send_stop(stop_graceful) click to toggle source
# File lib/serverengine/multi_thread_server.rb, line 44
def send_stop(stop_graceful)
  Thread.new do
    begin
      @worker.stop
    rescue => e
      ServerEngine.dump_uncaught_error(e)
    end
  end
  nil
end