726 |
|
return (status & COMPLETION_MASK) == CANCELLED; |
727 |
|
} |
728 |
|
|
729 |
– |
/** |
730 |
– |
* Returns {@code true} if the computation performed by this task |
731 |
– |
* has completed (or has been cancelled). |
732 |
– |
* |
733 |
– |
* @return {@code true} if this computation has completed |
734 |
– |
*/ |
729 |
|
public final boolean isDone() { |
730 |
|
return status < 0; |
731 |
|
} |
732 |
|
|
739 |
– |
/** |
740 |
– |
* Returns {@code true} if this task was cancelled. |
741 |
– |
* |
742 |
– |
* @return {@code true} if this task was cancelled |
743 |
– |
*/ |
733 |
|
public final boolean isCancelled() { |
734 |
|
return (status & COMPLETION_MASK) == CANCELLED; |
735 |
|
} |