optaplanner-core/src/main/java/org/optaplanner/core/impl/heuristic/thread/OrderByMoveIndexBlockingQueue.java
public void addExceptionThrown(int moveThreadIndex, Throwable throwable) {
        MoveResult<Solution_> result = new MoveResult<>(moveThreadIndex, throwable);
        synchronized (this) {
            innerQueue.add(result);
        }
    }
public void addExceptionThrown(int moveThreadIndex, Throwable throwable) {
        MoveResult<Solution_> result = new MoveResult<>(moveThreadIndex, throwable);
        synchronized (this) {
            innerQueue.add(result);
        }
    }
public void addExceptionThrown ( int moveThreadIndex , Throwable throwable ) { MoveResult < Solution_ > result = new MoveResult <> ( moveThreadIndex , throwable ) ; synchronized ( this ) { innerQueue . add ( result ) ; } }
This method is thread-safe. It can be called from any move thread.
Previous results (that haven't been consumed yet), will still be returned during iteration
before the iteration throws an exception,
unless there's a lower moveIndex that isn't in the queue yet.
@param moveThreadIndex {@code 0 <= moveThreadIndex < moveThreadCount}
@param throwable never null
This method is thread - safe . It can be called from any move thread . Previous results ( that haven t been consumed yet ) will still be returned during iteration before the iteration throws an exception unless there s a lower moveIndex that isn t in the queue yet .