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.30 by tim, Mon Dec 8 19:42:26 2003 UTC vs.
Revision 1.31 by tim, Tue Dec 9 18:38:28 2003 UTC

# Line 230 | Line 230 | public class Executors {
230      }
231  
232      /**
233     * Executes a Runnable task and returns a Future representing that
234     * task.
235     *
236     * @param executor the Executor to which the task will be submitted
237     * @param task the task to submit
238     * @param value the value which will become the return value of
239     * the task upon task completion
240     * @return a Future representing pending completion of the task
241     * @throws RejectedExecutionException if task cannot be scheduled
242     * for execution
243     */
244    public static <T> Future<T> execute(Executor executor, Runnable task, T value) {
245        FutureTask<T> ftask = new FutureTask<T>(task, value);
246        executor.execute(ftask);
247        return ftask;
248    }
249
250    /**
233       * Executes a value-returning task and returns a Future
234       * representing the pending results of the task.
235       *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines