code: private void waitForInputChannelsToBeClosed() throws IOException, InterruptedException {
  		// Wait for disconnection of all output gates
  		while (true) {
  
  			// Make sure, we leave this method with an InterruptedException when the task has been canceled
  			if (this.executionObserver.isCanceled()) {
  				throw new InterruptedException();
  			}
  
  			boolean allClosed = true;
  			for (int i = 0; i < getNumberOfInputGates(); i++) {
  				final InputGate<? extends IOReadableWritable> eig = this.inputGates.get(i);
  				if (!eig.isClosed()) {
  					allClosed = false;
  				}
  			}
  
  			if (allClosed) {
  				break;
  			}
  			else {
  				Thread.sleep(SLEEPINTERVAL);
  			}
  		}
  	}
docs: Blocks until all input channels are closed.
  
  @throws IOException          thrown if an error occurred while closing the input channels
  @throws InterruptedException thrown if the thread waiting for the channels to be closed is interrupted