2634 |
|
* completed. This method is designed for use only in error |
2635 |
|
* recovery actions, and even in such situations may result in |
2636 |
|
* ongoing dependent completions using established versus |
2637 |
< |
* overwritten values. |
2637 |
> |
* overwritten outcomes. |
2638 |
|
* |
2639 |
|
* @param value the completion value |
2640 |
|
*/ |
2643 |
|
postComplete(); |
2644 |
|
} |
2645 |
|
|
2646 |
+ |
/** |
2647 |
+ |
* Forcibly causes subsequent invocations of method get() and |
2648 |
+ |
* related methods to throw the given exception, whether or not |
2649 |
+ |
* already completed. This method is designed for use only in |
2650 |
+ |
* recovery actions, and even in such situations may result in |
2651 |
+ |
* ongoing dependent completions using established versus |
2652 |
+ |
* overwritten outcomes. |
2653 |
+ |
* |
2654 |
+ |
* @param ex the exception |
2655 |
+ |
*/ |
2656 |
+ |
public void obtrudeException(Throwable ex) { |
2657 |
+ |
if (ex == null) throw new NullPointerException(); |
2658 |
+ |
result = new AltResult(ex); |
2659 |
+ |
postComplete(); |
2660 |
+ |
} |
2661 |
+ |
|
2662 |
|
// Unsafe mechanics |
2663 |
|
private static final sun.misc.Unsafe UNSAFE; |
2664 |
|
private static final long RESULT; |