felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guilla...@apache.org
Subject svn commit: r1487780 - /felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/queue/ExecutorQueueService.java
Date Thu, 30 May 2013 08:12:19 GMT
Author: guillaume
Date: Thu May 30 08:12:19 2013
New Revision: 1487780

URL: http://svn.apache.org/r1487780
Log:
Properly wait for task termination (if any), this allow a more synchronous shutdown

Modified:
    felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/queue/ExecutorQueueService.java

Modified: felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/queue/ExecutorQueueService.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/queue/ExecutorQueueService.java?rev=1487780&r1=1487779&r2=1487780&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/queue/ExecutorQueueService.java
(original)
+++ felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/queue/ExecutorQueueService.java
Thu May 30 08:12:19 2013
@@ -97,6 +97,12 @@ public class ExecutorQueueService extend
      */
     public void stop() {
         m_executorService.shutdown();
+        // Wait for potential executed tasks to finish their executions
+        try {
+            m_executorService.awaitTermination(1, TimeUnit.SECONDS);
+        } catch (InterruptedException e) {
+            // Ignored
+        }
         super.stop();
     }
 



Mime
View raw message