diff options
author | Shixiong Zhu <shixiong@databricks.com> | 2015-11-25 23:31:21 -0800 |
---|---|---|
committer | Shixiong Zhu <shixiong@databricks.com> | 2015-11-25 23:31:21 -0800 |
commit | d3ef693325f91a1ed340c9756c81244a80398eb2 (patch) | |
tree | 077f5f457d58eb42b69bb90b56804db65792a6d9 /tags | |
parent | 068b6438d6886ce5b4aa698383866f466d913d66 (diff) | |
download | spark-d3ef693325f91a1ed340c9756c81244a80398eb2.tar.gz spark-d3ef693325f91a1ed340c9756c81244a80398eb2.tar.bz2 spark-d3ef693325f91a1ed340c9756c81244a80398eb2.zip |
[SPARK-11999][CORE] Fix the issue that ThreadUtils.newDaemonCachedThreadPool doesn't cache any task
In the previous codes, `newDaemonCachedThreadPool` uses `SynchronousQueue`, which is wrong. `SynchronousQueue` is an empty queue that cannot cache any task. This patch uses `LinkedBlockingQueue` to fix it along with other fixes to make sure `newDaemonCachedThreadPool` can use at most `maxThreadNumber` threads, and after that, cache tasks to `LinkedBlockingQueue`.
Author: Shixiong Zhu <shixiong@databricks.com>
Closes #9978 from zsxwing/cached-threadpool.
Diffstat (limited to 'tags')
0 files changed, 0 insertions, 0 deletions