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.29 by tim, Sun Dec 7 15:00:46 2003 UTC vs.
Revision 1.30 by tim, Mon Dec 8 19:42:26 2003 UTC

# Line 52 | Line 52 | public class Executors {
52              super(executor);
53              e = executor;
54          }
55 <        public ScheduledFuture<Boolean> schedule(Runnable command, long delay,  TimeUnit unit) {
55 >        public ScheduledFuture<?> schedule(Runnable command, long delay,  TimeUnit unit) {
56              return e.schedule(command, delay, unit);
57          }
58          public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
59              return e.schedule(callable, delay, unit);
60          }
61 <        public ScheduledFuture<Boolean> scheduleAtFixedRate(Runnable command, long initialDelay,  long period, TimeUnit unit) {
61 >        public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay,  long period, TimeUnit unit) {
62              return e.scheduleAtFixedRate(command, initialDelay, period, unit);
63          }
64 <        public ScheduledFuture<Boolean> scheduleWithFixedDelay(Runnable command, long initialDelay,  long delay, TimeUnit unit) {
64 >        public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay,  long delay, TimeUnit unit) {
65              return e.scheduleWithFixedDelay(command, initialDelay, delay, unit);
66          }
67      }
# Line 218 | Line 218 | public class Executors {
218       * @param executor the Executor to which the task will be submitted
219       * @param task the task to submit
220       * @return a Future representing pending completion of the task,
221 <     * and whose <tt>get()</tt> method will return <tt>Boolean.TRUE</tt>
221 >     * and whose <tt>get()</tt> method will return an arbitrary value
222       * upon completion
223       * @throws RejectedExecutionException if task cannot be scheduled
224       * for execution
225       */
226 <    public static Future<Boolean> execute(Executor executor, Runnable task) {
227 <        FutureTask<Boolean> ftask = new FutureTask<Boolean>(task, Boolean.TRUE);
226 >    public static Future<?> execute(Executor executor, Runnable task) {
227 >        FutureTask<?> ftask = new FutureTask<Boolean>(task, Boolean.TRUE);
228          executor.execute(ftask);
229          return ftask;
230      }
# Line 276 | Line 276 | public class Executors {
276       */
277      public static void invoke(Executor executor, Runnable task)
278              throws ExecutionException, InterruptedException {
279 <        FutureTask<Boolean> ftask = new FutureTask<Boolean>(task, Boolean.TRUE);
279 >        FutureTask<?> ftask = new FutureTask<Boolean>(task, Boolean.TRUE);
280          executor.execute(ftask);
281          ftask.get();
282      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines