Class SaneThreadPoolExecutor

All Implemented Interfaces:
MatsSocketStatics, Executor

public class SaneThreadPoolExecutor extends Object implements Executor, MatsSocketStatics
Trick to make ThreadPoolExecutor work as anyone in the world would expect: Have a constant pool of "corePoolSize", and then as more tasks are concurrently running than threads available, you increase the number of threads until "maxPoolSize", at which point the rest go on queue. Snitched from
  • Method Details

    • execute

      public void execute(Runnable command)
      Specified by:
      execute in interface Executor
    • shutdownNice

      public void shutdownNice(int gracefulShutdownMillis)