Waits (blocks) until a running pipeline finishes.
        
        Arguments:
        
          - timeout(``int``) [default: ``None``] Specifies the timeout, 
            ``RuntimeError`` will be raised. The default is to wait indefinetely
            for the pipeline to finish.

def wait(self, timeout=None):
        """
        Waits (blocks) until a running pipeline finishes.
        
        Arguments:
        
          - timeout(``int``) [default: ``None``] Specifies the timeout, 
            ``RuntimeError`` will be raised. The default is to wait indefinetely
            for the pipeline to finish.

        """
        if self._started.isSet() and \
           self._running.isSet() and \
           not self._pausing.isSet():
            self._finished.wait(timeout)
        else:
            raise PlumberError