public final class Runtime
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static BaseTask |
currentTask()
Get the current task of the current thread.
|
static void |
popTask()
Remove the top of the task-tracking stack for the current thread.
|
static void |
pushTask(BaseTask task)
Track the passed task as the currently executing task for this thread.
|
static void |
resizeWorkerThreads(int numWorkers)
A method for altering the number of worker threads used by PCDP at
runtime.
|
static void |
showRuntimeStats()
Print some basic runtime statistics.
|
static void |
submitTask(BaseTask task)
Run the provided task on the thread pool backing this runtime.
|
public static void resizeWorkerThreads(int numWorkers) throws java.lang.InterruptedException
numWorkers
- The number of workers to switch to using.java.lang.InterruptedException
- An error occurs shutting down the existing
runtime instance.public static BaseTask currentTask()
public static void pushTask(BaseTask task)
task
- Currently executing taskpublic static void popTask()
public static void submitTask(BaseTask task)
task
- Task to make eligible for execution.public static void showRuntimeStats()