aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-01 18:44:18 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-01 18:44:18 +0000
commitedf23673468775470d55d9af5103c41137a1c0a3 (patch)
tree55a3afc1fd196e6458646e30449925d73f1ba581 /include
parent57f035ecae1ff8f2b2e0614e0649f0b90c69adad (diff)
Fix race between ~SkThreadPool and SkThreadPool::Loop on fDone.
We're writing fDone without holding the mutex. Bad form, says tsan. In practice this is fairly innocuous, as fDone only ever goes from false to true and only once. Though, I wouldn't be surprised if there were some way this could leak a thread that never got the signal to die. BUG= R=scroggo@google.com, reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/25371003 git-svn-id: http://skia.googlecode.com/svn/trunk@11563 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/utils/SkThreadPool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/utils/SkThreadPool.h b/include/utils/SkThreadPool.h
index 3c86158090..98657034e5 100644
--- a/include/utils/SkThreadPool.h
+++ b/include/utils/SkThreadPool.h
@@ -43,7 +43,7 @@ public:
SkTInternalLList<LinkedRunnable> fQueue;
SkCondVar fReady;
SkTDArray<SkThread*> fThreads;
- bool fDone;
+ bool fDone;
static void Loop(void*); // Static because we pass in this.
};