camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1467573 - /camel/trunk/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java
Date Sat, 13 Apr 2013 08:22:08 GMT
Author: davsclaus
Date: Sat Apr 13 08:22:08 2013
New Revision: 1467573

URL: http://svn.apache.org/r1467573
Log:
CAMEL-6268: camel-stream - Shutdown thread pool on consumer should happen faster

Modified:
    camel/trunk/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java

Modified: camel/trunk/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java?rev=1467573&r1=1467572&r2=1467573&view=diff
==============================================================================
--- camel/trunk/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java
(original)
+++ camel/trunk/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamConsumer.java
Sat Apr 13 08:22:08 2013
@@ -82,10 +82,8 @@ public class StreamConsumer extends Defa
 
     @Override
     public void doStop() throws Exception {
-        // important: do not close the stream as it will close the standard
-        // system.in etc.
         if (executor != null) {
-            endpoint.getCamelContext().getExecutorServiceManager().shutdownGraceful(executor);
+            endpoint.getCamelContext().getExecutorServiceManager().shutdownNow(executor);
             executor = null;
         }
         lines.clear();
@@ -98,6 +96,8 @@ public class StreamConsumer extends Defa
     public void run() {
         try {
             readFromStream();
+        } catch (InterruptedException e) {
+            // we are closing down so ignore
         } catch (Exception e) {
             getExceptionHandler().handleException(e);
         }



Mime
View raw message