'Return (or if an exception, raise) the next remaining output of the
ones passed to the constructor.'

def get_output(self, remote_command):

    self.thread_id = current_thread().ident
    self.remote_command = remote_command
    result = self._outputs.pop(0)
    if isinstance(result, Exception):
        raise result
    else:
        return result
