Author: rombert
Date: Wed Jan 20 09:49:38 2016
New Revision: 1725689
URL: http://svn.apache.org/viewvc?rev=1725689&view=rev
Log:
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.
Modified:
sling/trunk/bundles/commons/threads/src/main/java/org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java
Modified:
sling/trunk/bundles/commons/threads/src/main/java/org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/commons/threads/src/main/java/org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java?rev=1725689&r1=1725688&r2=1725689&view=diff
==============================================================================
---
sling/trunk/bundles/commons/threads/src/main/java/org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java
(original)
+++
sling/trunk/bundles/commons/threads/src/main/java/org/apache/sling/commons/threads/ModifiableThreadPoolConfig.java
Wed Jan 20 09:49:38 2016
@@ -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 ModifiableThreadPoolC
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;