continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From batkin...@apache.org
Subject svn commit: r1671958 - in /continuum/trunk: continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/
Date Tue, 07 Apr 2015 21:39:49 GMT
Author: batkinson
Date: Tue Apr  7 21:39:49 2015
New Revision: 1671958

URL: http://svn.apache.org/r1671958
Log:
[CONTINUUM-2742] Startup/shutdown leaks threads from build task queue executors

Modified:
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/ParallelBuildsThreadedTaskQueueExecutor.java

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java?rev=1671958&r1=1671957&r2=1671958&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java
(original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java
Tue Apr  7 21:39:49 2015
@@ -28,6 +28,7 @@ import edu.emory.mathcs.backport.java.ut
 import edu.emory.mathcs.backport.java.util.concurrent.TimeoutException;
 import org.codehaus.plexus.component.annotations.Configuration;
 import org.codehaus.plexus.component.annotations.Requirement;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
@@ -44,7 +45,7 @@ import org.slf4j.LoggerFactory;
  * Codes were taken from Plexus' ThreadedTaskQueueExecutor
  */
 public class ThreadedDistributedBuildTaskQueueExecutor
-    implements DistributedBuildTaskQueueExecutor, Initializable, Startable
+    implements DistributedBuildTaskQueueExecutor, Initializable, Startable, Disposable
 {
     private static final int SHUTDOWN = 1;
 
@@ -329,6 +330,11 @@ public class ThreadedDistributedBuildTas
         }
     }
 
+    public void dispose()
+    {
+        executorRunnable.shutdown();
+    }
+
     public Task getCurrentTask()
     {
         return currentTask;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/ParallelBuildsThreadedTaskQueueExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/ParallelBuildsThreadedTaskQueueExecutor.java?rev=1671958&r1=1671957&r2=1671958&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/ParallelBuildsThreadedTaskQueueExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/ParallelBuildsThreadedTaskQueueExecutor.java
Tue Apr  7 21:39:49 2015
@@ -28,6 +28,7 @@ import edu.emory.mathcs.backport.java.ut
 import edu.emory.mathcs.backport.java.util.concurrent.TimeoutException;
 import org.codehaus.plexus.component.annotations.Configuration;
 import org.codehaus.plexus.component.annotations.Requirement;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
@@ -46,7 +47,7 @@ import org.slf4j.LoggerFactory;
  * Modified plexus ThreadedTaskQueueExecutor
  */
 public class ParallelBuildsThreadedTaskQueueExecutor
-    implements TaskQueueExecutor, Initializable, Startable
+    implements TaskQueueExecutor, Initializable, Startable, Disposable
 {
     private static final Logger log = LoggerFactory.getLogger( ParallelBuildsThreadedTaskQueueExecutor.class
);
 
@@ -331,6 +332,11 @@ public class ParallelBuildsThreadedTaskQ
         }
     }
 
+    public void dispose()
+    {
+        executorRunnable.shutdown();
+    }
+
     public Task getCurrentTask()
     {
         return currentTask;



Mime
View raw message