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

Comparing jsr166/src/main/java/util/concurrent/Executors.java (file contents):
Revision 1.24 by dl, Mon Nov 10 17:31:23 2003 UTC vs.
Revision 1.25 by dl, Thu Dec 4 20:54:29 2003 UTC

# Line 14 | Line 14 | import java.security.PrivilegedException
14  
15   /**
16   * Factory and utility methods for {@link Executor}, {@link
17 < * ExecutorService}, {@link ThreadFactory}, {@link Future}, and {@link
18 < * Cancellable} classes defined in this package.
17 > * ExecutorService}, {@link ThreadFactory}, and {@link Future}
18 > * classes defined in this package.
19   *
20   * @since 1.5
21   * @author Doug Lea
# Line 150 | Line 150 | public class Executors {
150      }
151  
152      /**
153 <     * Executes a Runnable task and returns a Cancellable representing that
153 >     * Executes a Runnable task and returns a Future representing that
154       * task.
155       *
156       * @param executor the Executor to which the task will be submitted
157       * @param task the task to submit
158 <     * @return a Cancellable representing pending completion of the task
158 >     * @return a Future representing pending completion of the task,
159 >     * and whose <tt>get()</tt> method will return <tt>Boolean.TRUE</tt>
160 >     * upon completion
161       * @throws RejectedExecutionException if task cannot be scheduled
162       * for execution
163       */
164 <    public static Cancellable execute(Executor executor, Runnable task) {
164 >    public static Future<Boolean> execute(Executor executor, Runnable task) {
165          FutureTask<Boolean> ftask = new FutureTask<Boolean>(task, Boolean.TRUE);
166          executor.execute(ftask);
167          return ftask;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines