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

Comparing jsr166/src/main/java/util/concurrent/ScheduledThreadPoolExecutor.java (file contents):
Revision 1.37 by dl, Tue Aug 29 23:30:36 2006 UTC vs.
Revision 1.38 by jsr166, Sun Sep 3 06:04:35 2006 UTC

# Line 201 | Line 201 | public class ScheduledThreadPoolExecutor
201              }
202              long d = (getDelay(TimeUnit.NANOSECONDS) -
203                        other.getDelay(TimeUnit.NANOSECONDS));
204 <            return (d == 0)? 0 : ((d < 0)? -1 : 1);
204 >            return (d == 0) ? 0 : ((d < 0) ? -1 : 1);
205          }
206  
207          /**
# Line 246 | Line 246 | public class ScheduledThreadPoolExecutor
246       * @param periodic true if this task periodic, false if delayed
247       */
248      boolean canRunInCurrentRunState(boolean periodic) {
249 <        return isRunningOrShutdown(periodic?
249 >        return isRunningOrShutdown(periodic ?
250                                     continueExistingPeriodicTasksAfterShutdown :
251                                     executeExistingDelayedTasksAfterShutdown);
252      }
# Line 309 | Line 309 | public class ScheduledThreadPoolExecutor
309                  if (e instanceof RunnableScheduledFuture) {
310                      RunnableScheduledFuture<?> t =
311                          (RunnableScheduledFuture<?>)e;
312 <                    if ((t.isPeriodic()? !keepPeriodic : !keepDelayed) ||
312 >                    if ((t.isPeriodic() ? !keepPeriodic : !keepDelayed) ||
313                          t.isCancelled()) { // also remove if already cancelled
314                          if (q.remove(t))
315                              t.cancel(false);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines