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

Comparing jsr166/src/main/java/util/concurrent/ThreadPoolExecutor.java (file contents):
Revision 1.171 by jsr166, Wed Mar 22 20:22:57 2017 UTC vs.
Revision 1.172 by jsr166, Tue Mar 28 18:13:10 2017 UTC

# Line 811 | Line 811 | public class ThreadPoolExecutor extends
811      }
812  
813      /**
814     * State check needed by ScheduledThreadPoolExecutor to
815     * enable running tasks during shutdown.
816     *
817     * @param shutdownOK true if should return true if SHUTDOWN
818     */
819    final boolean isRunningOrShutdown(boolean shutdownOK) {
820        int rs = runStateOf(ctl.get());
821        return rs == RUNNING || (rs == SHUTDOWN && shutdownOK);
822    }
823
824    /**
814       * Drains the task queue into a new list, normally using
815       * drainTo. But if the queue is a DelayQueue or any other kind of
816       * queue for which poll or drainTo may fail to remove some
# Line 1414 | Line 1403 | public class ThreadPoolExecutor extends
1403          return ! isRunning(ctl.get());
1404      }
1405  
1406 +    /** Used by ScheduledThreadPoolExecutor. */
1407 +    boolean isStopped() {
1408 +        return runStateAtLeast(ctl.get(), STOP);
1409 +    }
1410 +
1411      /**
1412       * Returns true if this executor is in the process of terminating
1413       * after {@link #shutdown} or {@link #shutdownNow} but has not

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines