ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/FutureTask.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/FutureTask.java (file contents):
Revision 1.6 by tim, Thu Jul 31 19:49:42 2003 UTC vs.
Revision 1.7 by dl, Wed Aug 6 16:08:49 2003 UTC

# Line 109 | Line 109 | public class FutureTask<V> extends Cance
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines