code: def _run_pass(self):
          
          while True:
              try:
                  data = self._file.read(4096)
              except IOError, e:
                  if e.errno == errno.ESTALE:
                      self.active = False
                      return False
  
              lines = self._buffer_extract(data)
  
              if not lines:
                  # Before returning, check if an event (maybe partial) is waiting for too long.
                  if self._current_event and time.time() - self._last_activity > 1:
                      event = '\n'.join(self._current_event)
                      self._current_event.clear()
                      self._callback_wrapper([event])
                  break
  
              self._last_activity = time.time()
  
              if self._multiline_regex_after or self._multiline_regex_before:
                  # Multiline is enabled for this file.
                  events = multiline_merge(
                          lines,
                          self._current_event,
                          self._multiline_regex_after,
                          self._multiline_regex_before)
              else:
                  events = lines
  
              if events:
                  self._callback_wrapper(events)
  
              if self._sincedb_path:
                  current_line_count = len(lines)
                  self._sincedb_update_position(lines=current_line_count)
  
          self._sincedb_update_position()
docs: Read lines from a file and performs a callback against them