def run(timeout = nil)
      raise RuntimeError, "no watchers for this loop" if @watchers.empty?

      @running = true
      while @running and not @active_watchers.zero?
        run_once(timeout)
      end
      @running = false
    end
def run(timeout = nil)
      raise RuntimeError, "no watchers for this loop" if @watchers.empty?

      @running = true
      while @running and not @active_watchers.zero?
        run_once(timeout)
      end
      @running = false
    end
Run the event loop and dispatch events back to Ruby.  If there
 are no watchers associated with the event loop it will return
 immediately.  Otherwise, run will continue blocking and making
 event callbacks to watchers until all watchers associated with
 the loop have been disabled or detached.  The loop may be
 explicitly stopped by calling the stop method on the loop object.