diff options
author | John Reck <jreck@google.com> | 2015-02-04 22:08:27 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-04 22:08:27 +0000 |
commit | c7e6b93aba9dce93aacb05b5d9f59d09eddb0329 (patch) | |
tree | 4ac6ea4f9cdc30c08c5a6f81f3301220667e5679 /libs/hwui/thread/TaskManager.cpp | |
parent | 4c49b1fb774d59d3a6e8a6bb5a4549828504c5af (diff) | |
parent | af6eaf656ec0de5fcbea03968daffe2c845e2089 (diff) | |
download | frameworks_base-c7e6b93aba9dce93aacb05b5d9f59d09eddb0329.zip frameworks_base-c7e6b93aba9dce93aacb05b5d9f59d09eddb0329.tar.gz frameworks_base-c7e6b93aba9dce93aacb05b5d9f59d09eddb0329.tar.bz2 |
am af6eaf65: Merge "Fix ANR caused by hwuiTask thread" automerge: 5ad36d4
* commit 'af6eaf656ec0de5fcbea03968daffe2c845e2089':
Fix ANR caused by hwuiTask thread
Diffstat (limited to 'libs/hwui/thread/TaskManager.cpp')
-rw-r--r-- | libs/hwui/thread/TaskManager.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/hwui/thread/TaskManager.cpp b/libs/hwui/thread/TaskManager.cpp index 3c30aab..c69b2fd 100644 --- a/libs/hwui/thread/TaskManager.cpp +++ b/libs/hwui/thread/TaskManager.cpp @@ -105,6 +105,8 @@ bool TaskManager::WorkerThread::threadLoop() { bool TaskManager::WorkerThread::addTask(TaskWrapper task) { if (!isRunning()) { run(mName.string(), PRIORITY_DEFAULT); + } else if (exitPending()) { + return false; } Mutex::Autolock l(mLock); @@ -120,10 +122,6 @@ size_t TaskManager::WorkerThread::getTaskCount() const { } void TaskManager::WorkerThread::exit() { - { - Mutex::Autolock l(mLock); - mTasks.clear(); - } requestExit(); mSignal.signal(); } |