You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:26:45 UTC

[sling-org-apache-sling-commons-threads] 04/06: SLING-5416 - Thread Pool should stop "gracefully"

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.threads-3.2.6
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-threads.git

commit 232521a7e956660ce94d7cc6d4ec333d702dc0e4
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Jan 20 09:49:38 2016 +0000

    SLING-5416 - Thread Pool should stop "gracefully"
    
    Multiple components used by Sling applications are affected by usage of
    Thread.interrupt. Some notable examples, mentioned by Thomas Mueller,
    are Lucene, MapDB and Oak's persistent cache.
    
    To be on the safe side, we change the default value of shutdownGraceful
    to true. This might cause misbehaving components to stall and never be
    stopped, avoiding data corruption is more important.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/threads@1725689 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java b/src/main/java/org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java
index bfe789d..febdf9a 100644
--- a/src/main/java/org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java
+++ b/src/main/java/org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java
@@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit;
  * - queue size: -1
  * - keep alive time: 60000
  * - block policy: RUN
- * - shutdown graceful: false
+ * - shutdown graceful: true
  * - shutdown wait time: -1
  * - priority: NORM
  * - daemon: false
@@ -82,7 +82,7 @@ public final class ModifiableThreadPoolConfig implements ThreadPoolConfig {
     private ThreadPoolPolicy blockPolicy = ThreadPoolPolicy.RUN;
 
     /** Try to shutdown gracefully? */
-    private  boolean shutdownGraceful = false;
+    private  boolean shutdownGraceful = true;
 
     /** Wait time during shutdown. */
     private  int shutdownWaitTimeMs = -1;

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.