@SuppressWarnings("rawtypes")
  private void updateNextOutputAvailableFuture() {
    if (preserveOrder) {
      nextOutputAvailableFuture = inProgress.isEmpty() ? completedFuture(null) : inProgress.get(0);
    } else {
      nextOutputAvailableFuture =
          CompletableFuture.anyOf(inProgress.toArray(new CompletableFuture[0]));
    }
  }
CompletableFuture.anyOf adds a completion handler to every future its passed so if we call it
too often we can quickly wind up with thousands of completion handlers which take a long time
to iterate through and notify. So only create it when the futures it covers have actually
changed.
services/pipeline/src/main/java/org/hyperledger/besu/services/pipeline/AsyncOperationProcessor.java