def run
      while @running
        begin
          @timers.wait do |interval|
            interval = 0 if interval && interval < 0

            if message = @mailbox.check(interval)
              handle_message(message)

              break unless @running
            end
          end
        rescue MailboxShutdown
          @running = false
        rescue MailboxDead
          # TODO: not tests (but fails occasionally in tests)
          @running = false
        end
      end

      shutdown
    rescue ::Exception => ex
      handle_crash(ex)
      raise unless ex.is_a?(StandardError) || ex.is_a?(Celluloid::Interruption)
    end
def run
      while @running
        begin
          @timers.wait do |interval|
            interval = 0 if interval && interval < 0

            if message = @mailbox.check(interval)
              handle_message(message)

              break unless @running
            end
          end
        rescue MailboxShutdown
          @running = false
        rescue MailboxDead
          # TODO: not tests (but fails occasionally in tests)
          @running = false
        end
      end

      shutdown
    rescue ::Exception => ex
      handle_crash(ex)
      raise unless ex.is_a?(StandardError) || ex.is_a?(Celluloid::Interruption)
    end
Run the actor loop