code: @Override
  	public MutableObjectIterator<E> getIterator() throws InterruptedException {
  		synchronized (this.iteratorLock) {
  			// wait while both the iterator and the exception are not set
  			while (this.iterator == null && this.iteratorException == null) {
  				this.iteratorLock.wait();
  			}
  			
  			if (this.iteratorException != null) {
  				throw new RuntimeException("Error obtaining the sorted input: " + this.iteratorException.getMessage(),
  					this.iteratorException);
  			}
  			else {
  				return this.iterator;
  			}
  		}
  	}
docs: ------------------------------------------------------------------------