code: def _finish(self, ispausing):
          
          if ispausing:
              self.log.debug('%s paused' % repr(self))
          else:
              self._finished.set()
              self.log.debug('%s finished' % repr(self))
docs: (internal) executes when last output piper raises ``StopIteration``.