Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ private void tryConsumeWaitingIntermediateBestSolution() {
}
if (activeConsumption.tryAcquire()) {
scheduleIntermediateBestSolutionConsumption()
.whenCompleteAsync((solution, throwable) -> {
.whenComplete((unused, throwable) -> {
activeConsumption.release();
tryConsumeWaitingIntermediateBestSolution();
}, consumerExecutor);
});
Comment thread
triceo marked this conversation as resolved.
}
}

Expand Down Expand Up @@ -120,7 +120,7 @@ void consumeFirstInitializedSolution(Solution_ solution, EventProducerId produce
this.firstInitializedSolution.getAndSet(solution); // Reachable more than once; problem change triggers restart.
scheduleFirstInitializedSolutionConsumption(s -> firstInitializedSolutionConsumer
.accept(new FirstInitializedSolutionEventImpl<>(s, producerId, isTerminatedEarly)))
.whenCompleteAsync((unused, throwable) -> firstSolutionConsumption.release(), consumerExecutor);
.whenComplete((unused, throwable) -> firstSolutionConsumption.release());
}

private CompletableFuture<Void> scheduleFirstInitializedSolutionConsumption(Consumer<? super Solution_> solutionConsumer) {
Expand Down Expand Up @@ -153,8 +153,7 @@ void consumeStartSolverJob(Solution_ solution) {
throw new IllegalStateException("Interrupted when waiting for the start solver job consumption.");
}
this.initialSolution.getAndSet(solution); // Reachable more than once; problem change triggers restart.
scheduleStartJobConsumption().whenCompleteAsync((unused, throwable) -> startSolverJobConsumption.release(),
consumerExecutor);
scheduleStartJobConsumption().whenComplete((unused, throwable) -> startSolverJobConsumption.release());
Comment thread
triceo marked this conversation as resolved.
}

private CompletableFuture<Void> scheduleStartJobConsumption() {
Expand Down
Loading