Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2672

SolverManager.addProblemChange() should return CompletableFuture<Void>

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 8.20.0.Final
    • None
    • optaplanner-core
    • None

      Problem:
      solverManager.solverAndListen(..., bestSolution ->

      { … // happens on a consumer thread! }

      );

      solverJob.addProblemChange(...);
      // how to wait for the BS containing the change?

      Proposed solution:
      CompletableFuture<Void> problemChangeProcessed = solverJob.addProblemChange(...);
      problemChangeProcessed.get(); // gets completed when the consumer received the BS containing the change.

              rsynek@redhat.com Radovan Synek (Inactive)
              rsynek@redhat.com Radovan Synek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: