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.25 by jsr166, Wed Aug 24 05:01:01 2005 UTC vs.
Revision 1.26 by jsr166, Sat Aug 27 23:23:18 2005 UTC

# Line 30 | Line 30 | import java.util.concurrent.*; // for ja
30   * class App {
31   *   ExecutorService executor = ...
32   *   ArchiveSearcher searcher = ...
33 < *   void showSearch(final String target) throws InterruptedException {
34 < *     Future&lt;String&gt; future = executor.submit(new Callable&lt;String&gt;() {
33 > *   void showSearch(final String target)
34 > *       throws InterruptedException {
35 > *     Future&lt;String&gt; future
36 > *       = executor.submit(new Callable&lt;String&gt;() {
37   *         public String call() { return searcher.search(target); }
38   *     });
39   *     displayOtherThings(); // do other things while searching
# Line 95 | Line 97 | public interface Future<V> {
97       * cancellation -- in all of these cases, this method will return
98       * <tt>true</tt>.
99       *
100 <     * @return <tt>true</tt> if this task completed.
100 >     * @return <tt>true</tt> if this task completed
101       */
102      boolean isDone();
103  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines