ivakegg commented on a change in pull request #1622:
URL: https://github.com/apache/accumulo/pull/1622#discussion_r450828405
##########
File path:
core/src/main/java/org/apache/accumulo/core/util/SimpleThreadPool.java
##########
@@ -28,15 +28,32 @@
*/
public class SimpleThreadPool extends ThreadPoolExecutor {
- public SimpleThreadPool(int max, final String name) {
- super(max, max, 4L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
+ // the number of seconds before we allow a thread to terminate with non-use.
+ public static final long DEFAULT_TIMEOUT_MILLISECS = 180000L;
+
+ public SimpleThreadPool(int coreAndMax, final String name) {
+ this(coreAndMax, DEFAULT_TIMEOUT_MILLISECS, name);
+ }
+
+ public SimpleThreadPool(int coreAndMax, long threadTimeOut, final String
name) {
+ super(coreAndMax, coreAndMax, threadTimeOut, TimeUnit.MILLISECONDS, new
LinkedBlockingQueue<>(),
Review comment:
That would work and would be cleaner. I could also them remove the
redundant lines after. I will add this change.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]