GitHub user zsxwing opened a pull request:
https://github.com/apache/spark/pull/9978
[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`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zsxwing/spark cached-threadpool
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9978.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #9978
----
commit b870612448f0dffe88369f26230e7b45167723e5
Author: Shixiong Zhu <[email protected]>
Date: 2015-11-25T22:09:24Z
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.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]