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.4 by dl, Tue Jun 3 16:44:36 2003 UTC vs.
Revision 1.5 by dl, Wed Jun 4 11:34:19 2003 UTC

# Line 41 | Line 41 | public class Executors {
41          public List shutdownNow() { return e.shutdownNow(); }
42          public boolean isShutdown() { return e.isShutdown(); }
43          public boolean isTerminated() { return e.isTerminated(); }
44        public boolean remove(Runnable r) { return e.remove(r) ; }
44          public boolean awaitTermination(long timeout, TimeUnit unit)
45              throws InterruptedException {
46              return e.awaitTermination(timeout, unit);
# Line 159 | Line 158 | public class Executors {
158       * @param task the task to submit
159       * @param value the value which will become the return value of
160       * the task upon task completion
161 <     * @return a CancellableTask that allows cancellation.
161 >     * @return a Future representing pending completion of the task
162       * @throws CannotExecuteException if the task cannot be scheduled
163       * for execution
164       */
165 <    public static CancellableTask execute(Executor executor, Runnable task) {
166 <        CancellableTask ftask = new CancellableTask(task);
165 >    public static <T> Future<T> execute(Executor executor, Runnable task, T value) {
166 >        FutureTask<T> ftask = new FutureTask<T>(task, value);
167          executor.execute(ftask);
168          return ftask;
169      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines