HBASE-8003 Threads#getBoundedCachedThreadPool harcodes the time unit to seconds
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1452912 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
13f2700645
commit
fc6f7a031b
@ -175,7 +175,7 @@ public class Threads {
|
|||||||
ThreadFactory threadFactory) {
|
ThreadFactory threadFactory) {
|
||||||
ThreadPoolExecutor boundedCachedThreadPool =
|
ThreadPoolExecutor boundedCachedThreadPool =
|
||||||
new ThreadPoolExecutor(maxCachedThread, maxCachedThread, timeout,
|
new ThreadPoolExecutor(maxCachedThread, maxCachedThread, timeout,
|
||||||
TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory);
|
unit, new LinkedBlockingQueue<Runnable>(), threadFactory);
|
||||||
// allow the core pool threads timeout and terminate
|
// allow the core pool threads timeout and terminate
|
||||||
boundedCachedThreadPool.allowCoreThreadTimeOut(true);
|
boundedCachedThreadPool.allowCoreThreadTimeOut(true);
|
||||||
return boundedCachedThreadPool;
|
return boundedCachedThreadPool;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user