public interface TaskHandle
A handle is a reference that allows control over the execution of a Task.
Modifier and Type | Method and Description |
---|---|
boolean |
isTerminated()
Check if the underlying Task is terminated.
|
void |
setTerminated()
Set the underlying Task as terminated.
|
boolean isTerminated()
A terminated Task will no longer execute, and the handle to the task should be released in order to prevent a memory leak.
void setTerminated()
If the Task that the handle refers to is already terminated, then this method has no effect.