Class DeepJExecutor
java.lang.Object
io.github.kirstenali.deepj.concurrent.DeepJExecutor
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidforRange(int startInclusive, int endExclusive, IntConsumer body) static intCurrent number of threads used by DeepJ.static booleanWhether DeepJ uses parallel execution for eligible loops.static voidsetNumThreads(int n) static voidsetParallelEnabled(boolean enabled) static voidshutdown()Clean shutdown (good for CLI apps/tests).
-
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
-