def _setup_async_flusher
      # stop and remove any existing async flusher instance
      if @async_flusher
        @async_flusher.stop
        @async_flusher = nil
        Thread.pass
      end

      # create a new async flusher if we have a valid flush period
      if @flush_period || async?
        @auto_flushing = DEFAULT_BUFFER_SIZE unless @auto_flushing > 1
        @async_flusher = AsyncFlusher.new(self, @flush_period)
        @async_flusher.start
        Thread.pass
      end

      nil
    end
def _setup_async_flusher
      # stop and remove any existing async flusher instance
      if @async_flusher
        @async_flusher.stop
        @async_flusher = nil
        Thread.pass
      end

      # create a new async flusher if we have a valid flush period
      if @flush_period || async?
        @auto_flushing = DEFAULT_BUFFER_SIZE unless @auto_flushing > 1
        @async_flusher = AsyncFlusher.new(self, @flush_period)
        @async_flusher.start
        Thread.pass
      end

      nil
    end
Using the flush_period, create a new AsyncFlusher attached to this
 appender. If the flush_period is nil, then no action will be taken. If a
 AsyncFlusher already exists, it will be stopped and a new one will be
 created.

 Returns `nil`