109 |
|
} |
110 |
|
|
111 |
|
/** |
112 |
< |
* Sets the value of this task to the given value. This method |
113 |
< |
* should only be called once; once it is called, the computation |
114 |
< |
* is assumed to have completed. |
112 |
> |
* Sets the value of this task to the given value. After this |
113 |
> |
* method is called, the computation is assumed to be completed -- |
114 |
> |
* threads already waiting for the result via <tt>get</tt> are |
115 |
> |
* unblocked, and future attempts to retrieve the result will not |
116 |
> |
* block. While not explicity disallowed, it is rarely a good idea |
117 |
> |
* to invoke <tt>set</tt> more than once. |
118 |
|
* |
119 |
|
* @param v the value |
120 |
|
* |
118 |
– |
* @fixme Need to clarify "should" in "should only be called once". |
121 |
|
*/ |
122 |
|
protected void set(V v) { |
123 |
|
((InnerCancellableFuture<V>)getRunnable()).set(v); |