docs: def drain(self, p):
          '''Reads the named pipe.'''
  
          self.logging.info('Started.')
          fd = os.open(p, os.O_RDWR | os.O_NONBLOCK)
          gevent_os.make_nonblocking(fd)
  
          while self.loop():
              try:
                  lines = gevent_os.nb_read(fd, 4096).splitlines()
                  if len(lines) == 0:
                      sleep(0.5)
                  else:
                      self.consume(lines)
              except OSError:
                  pass