module Timeout

def self.ensure_timeout_thread_created

def self.ensure_timeout_thread_created
  unless @timeout_thread and @timeout_thread.alive?
    TIMEOUT_THREAD_MUTEX.synchronize do
      unless @timeout_thread and @timeout_thread.alive?
        @timeout_thread = create_timeout_thread
      end
    end
  end
end