def _reader(self, name, stream, outbuf):
while True:<EOL><INDENT>s = stream.readline()<EOL>if not s:<EOL><INDENT>break<EOL><DEDENT>s = s.decode('<STR_LIT:utf-8>').rstrip()<EOL>outbuf.append(s)<EOL>logger.debug('<STR_LIT>' % (name, s))<EOL><DEDENT>stream.close()<EOL>
Thread runner for reading lines of from a subprocess into a buffer.

:param name: The logical name of the stream (used for logging only).
:param stream: The stream to read from. This will typically a pipe
               connected to the output stream of a subprocess.
:param outbuf: The list to append the read lines to.