Class MCRRunnableComperator

java.lang.Object
org.mycore.util.concurrent.MCRRunnableComperator
All Implemented Interfaces:
Comparator<Runnable>

public class MCRRunnableComperator extends Object implements Comparator<Runnable>
A CompletableFuture encapsulates a Supplier with an AsyncSupply. This make a ThreadPoolExecutor with a PriorityBlockingQueue useless. To regain the Comparable feature we have to unwrap the AsyncSupply and compare the original Runnable. stackoverflow Note: this comparator imposes orderings that are inconsistent with equals.
Author:
Matthias Eichner
  • Constructor Details

    • MCRRunnableComperator

      public MCRRunnableComperator()
  • Method Details