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

Comparing jsr166/src/main/java/util/concurrent/Future.java (file contents):
Revision 1.26 by jsr166, Sat Aug 27 23:23:18 2005 UTC vs.
Revision 1.27 by jsr166, Sun Aug 28 00:04:39 2005 UTC

# Line 34 | Line 34 | import java.util.concurrent.*; // for ja
34   *       throws InterruptedException {
35   *     Future<String> future
36   *       = executor.submit(new Callable<String>() {
37 < *         public String call() { return searcher.search(target); }
38 < *     });
37 > *         public String call() {
38 > *             return searcher.search(target);
39 > *         }});
40   *     displayOtherThings(); // do other things while searching
41   *     try {
42   *       displayText(future.get()); // use future
# Line 73 | Line 74 | public interface Future<V> {
74       * whether the thread executing this task should be interrupted in
75       * an attempt to stop the task.
76       *
77 +     * <p>After this method returns, subsequent calls to {@link #isDone} will
78 +     * always return <tt>true</tt>.  Subsequent calls to {@link #isCancelled}
79 +     * will always return <tt>true</tt> if this method returned <tt>true</tt>.
80 +     *
81       * @param mayInterruptIfRunning <tt>true</tt> if the thread executing this
82       * task should be interrupted; otherwise, in-progress tasks are allowed
83       * to complete

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines