public final class ThreadingPolicy extends Object
ThreadPool
.Modifier and Type | Method and Description |
---|---|
static void |
configureToUseAllLogicalProcessors()
Configures the threading policy so that parallelizable operations use one thread for each
logical processor on the system.
|
static void |
configureToUseCurrentThreadOnly()
Configures the threading policy so that parallelizable operations are executed using only
the thread that invoked them.
|
static int |
getNumberOfThreads()
Gets the number of threads to use to execute parallelizable operations.
|
static ThreadSource |
getThreadSource()
Gets the source of new threads to be used to execute parallelizable operations.
|
static void |
resetCurrentToDefault()
Resets the current threading policy to the default.
|
static void |
setNumberOfThreads(int value)
Sets the number of threads to use to execute parallelizable operations.
|
static void |
setThreadSource(ThreadSource value)
Sets the source of new threads to be used to execute parallelizable operations.
|
static void |
useCurrentAsDefault()
Sets the current threading policy as the default policy to be used for new threads.
|
public static void configureToUseAllLogicalProcessors()
public static void configureToUseCurrentThreadOnly()
public static void useCurrentAsDefault()
public static void resetCurrentToDefault()
public static int getNumberOfThreads()
public static void setNumberOfThreads(int value)
@Nonnull public static ThreadSource getThreadSource()
public static void setThreadSource(@Nonnull ThreadSource value)