Merge change 5529 into donut
* changes: Tweak the core and maximum pool sizes for AsyncTask.
This commit is contained in:
@@ -127,12 +127,12 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||||||
public abstract class AsyncTask<Params, Progress, Result> {
|
public abstract class AsyncTask<Params, Progress, Result> {
|
||||||
private static final String LOG_TAG = "AsyncTask";
|
private static final String LOG_TAG = "AsyncTask";
|
||||||
|
|
||||||
private static final int CORE_POOL_SIZE = 1;
|
private static final int CORE_POOL_SIZE = 5;
|
||||||
private static final int MAXIMUM_POOL_SIZE = 10;
|
private static final int MAXIMUM_POOL_SIZE = 128;
|
||||||
private static final int KEEP_ALIVE = 10;
|
private static final int KEEP_ALIVE = 10;
|
||||||
|
|
||||||
private static final BlockingQueue<Runnable> sWorkQueue =
|
private static final BlockingQueue<Runnable> sWorkQueue =
|
||||||
new LinkedBlockingQueue<Runnable>(MAXIMUM_POOL_SIZE);
|
new LinkedBlockingQueue<Runnable>(10);
|
||||||
|
|
||||||
private static final ThreadFactory sThreadFactory = new ThreadFactory() {
|
private static final ThreadFactory sThreadFactory = new ThreadFactory() {
|
||||||
private final AtomicInteger mCount = new AtomicInteger(1);
|
private final AtomicInteger mCount = new AtomicInteger(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user