Class DeepJExecutor

java.lang.Object
io.github.kirstenali.deepj.concurrent.DeepJExecutor

public final class DeepJExecutor extends Object
  • Method Details

    • setNumThreads

      public static void setNumThreads(int n)
    • getNumThreads

      public static int getNumThreads()
      Current number of threads used by DeepJ.
    • setParallelEnabled

      public static void setParallelEnabled(boolean enabled)
    • isParallelEnabled

      public static boolean isParallelEnabled()
      Whether DeepJ uses parallel execution for eligible loops.
    • shutdown

      public static void shutdown()
      Clean shutdown (good for CLI apps/tests). Daemon threads already let the JVM exit, but shutdown avoids work continuing after main finishes.
    • forRange

      public static void forRange(int startInclusive, int endExclusive, IntConsumer body)