OSDN Git Service

Adjust AsyncTask.THREAD_POOL_EXECUTOR config
authorHans Boehm <hboehm@google.com>
Sat, 2 Feb 2019 01:52:40 +0000 (17:52 -0800)
committerHans Boehm <hboehm@google.com>
Tue, 12 Feb 2019 23:43:26 +0000 (15:43 -0800)
commit573bb79cfb7e51f20ff5a2dfdf23509354720f0f
treed696ff27e1370e621834a11ae21afcd730050d26
parente396fe4a02686850e7e72e52416e4b29b79d7979
Adjust AsyncTask.THREAD_POOL_EXECUTOR config

Remove the queue, reduce core pool size but no longer let it time out.

Reduce the timeout for additional threads.

If necessary, use a special executor, with an unbounded queue, to run
overflow tasks.

Bug: 123762797
Test: AOSP boots, also with MAXIMUM_POOL_SIZE = 1.
Change-Id: I4bc9593a044d1773ff1878684e2397a7c2a9a87a
core/java/android/os/AsyncTask.java