polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [3/6] zest-qi4j git commit: SchedulerMixin didn't shut down properly.
Date Thu, 25 Jun 2015 08:13:51 GMT
SchedulerMixin didn't shut down properly.


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/205cbe99
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/205cbe99
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/205cbe99

Branch: refs/heads/develop
Commit: 205cbe994016555300846f0e8dd042fc82e8c92b
Parents: 0b9b655
Author: Niclas Hedhman <niclas@hedhman.org>
Authored: Wed Jun 24 22:21:58 2015 +0800
Committer: Niclas Hedhman <niclas@hedhman.org>
Committed: Wed Jun 24 22:21:58 2015 +0800

----------------------------------------------------------------------
 .../java/org/qi4j/library/scheduler/SchedulerMixin.java     | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/205cbe99/libraries/scheduler/src/main/java/org/qi4j/library/scheduler/SchedulerMixin.java
----------------------------------------------------------------------
diff --git a/libraries/scheduler/src/main/java/org/qi4j/library/scheduler/SchedulerMixin.java
b/libraries/scheduler/src/main/java/org/qi4j/library/scheduler/SchedulerMixin.java
index 02f3132..6650573 100644
--- a/libraries/scheduler/src/main/java/org/qi4j/library/scheduler/SchedulerMixin.java
+++ b/libraries/scheduler/src/main/java/org/qi4j/library/scheduler/SchedulerMixin.java
@@ -265,6 +265,15 @@ public class SchedulerMixin
     public void passivateService()
         throws Exception
     {
+        managementExecutor.shutdown();
+        taskExecutor.shutdown();
+
+        managementExecutor.awaitTermination( 5, TimeUnit.SECONDS );
+        managementExecutor.shutdownNow();
+
+        taskExecutor.awaitTermination( 5, TimeUnit.SECONDS );
+        taskExecutor.shutdownNow();
+
         LOGGER.debug( "Passivated" );
     }
 


Mime
View raw message