changeset 106:223d5012fd4e

Invert Executor.isShutdownAllowed
author shade
date Thu, 08 Aug 2013 14:53:30 +0400
parents 3f3f5ea4277d
children 770903755f02
files jmh-core/src/main/java/org/openjdk/jmh/runner/BaseMicroBenchmarkHandler.java
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/BaseMicroBenchmarkHandler.java	Thu Aug 08 14:53:05 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/BaseMicroBenchmarkHandler.java	Thu Aug 08 14:53:30 2013 +0400
@@ -145,17 +145,17 @@
             }
 
             @Override
-            boolean shutdownAllowed() {
+            boolean shutdownForbidden() {
                 // this is a system-wide executor, don't shutdown
-                return false;
+                return true;
             }
 
         };
 
         abstract ExecutorService createExecutor(int maxThreads, String prefix);
 
-        boolean shutdownAllowed() {
-            return true;
+        boolean shutdownForbidden() {
+            return false;
         }
     }
 
@@ -167,7 +167,7 @@
      * @param executor service to shutdown
      */
     static void shutdownExecutor(ExecutorService executor) {
-        if (!EXECUTOR_TYPE.shutdownAllowed() || (executor == null)) {
+        if (EXECUTOR_TYPE.shutdownForbidden() || (executor == null)) {
             return;
         }
         while (true) {