felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1044415 - /felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java
Date Fri, 10 Dec 2010 16:08:20 GMT
Author: gnodet
Date: Fri Dec 10 16:08:20 2010
New Revision: 1044415

URL: http://svn.apache.org/viewvc?rev=1044415&view=rev
Log:
[FELIX-2723] When the execution of a closure with pipes is interrupted, pipes should be interrupted
too

Modified:
    felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java

Modified: felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java?rev=1044415&r1=1044414&r2=1044415&view=diff
==============================================================================
--- felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java (original)
+++ felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java Fri
Dec 10 16:08:20 2010
@@ -188,9 +188,20 @@ public class Closure implements Function
                 {
                     pipe.start();
                 }
-                for (Pipe pipe : pipes)
+                try
                 {
-                    pipe.join();
+                    for (Pipe pipe : pipes)
+                    {
+                        pipe.join();
+                    }
+                }
+                catch (InterruptedException e)
+                {
+                    for (Pipe pipe : pipes)
+                    {
+                        pipe.interrupt();
+                    }
+                    throw e;
                 }
             }
 



Mime
View raw message