diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-07 07:51:16 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-07 07:51:16 +0000 |
commit | 6c710ee20601c5afeb56404982069b6d3975fe91 (patch) | |
tree | f1b47f3443bdb375614b69175c764c831306586d /base/worker_pool.h | |
parent | 6b0507b19e93b12330bca55841927cb03d9942a7 (diff) | |
download | chromium_src-6c710ee20601c5afeb56404982069b6d3975fe91.zip chromium_src-6c710ee20601c5afeb56404982069b6d3975fe91.tar.gz chromium_src-6c710ee20601c5afeb56404982069b6d3975fe91.tar.bz2 |
Attempt to fix a DCHECK failure related to usage of Singletons
and WorkerPool.
Also add a warning for users of WorkerPool that they need to be
very careful about subtle issues.
Also see discussion in http://codereview.chromium.org/1834002/show
TEST=none
BUG=30177
Review URL: http://codereview.chromium.org/2033001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46665 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/worker_pool.h')
-rw-r--r-- | base/worker_pool.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/worker_pool.h b/base/worker_pool.h index bf214d1..ef7d679 100644 --- a/base/worker_pool.h +++ b/base/worker_pool.h @@ -11,6 +11,12 @@ class Task; // This is a facility that runs tasks that don't require a specific thread or // a message loop. +// +// WARNING: This shouldn't be used unless absolutely necessary. We don't wait +// for the worker pool threads to finish on shutdown, so the tasks running +// inside the pool must be extremely careful about other objects they access +// (MessageLoops, Singletons, etc). During shutdown these object may no longer +// exist. class WorkerPool { public: // This function posts |task| to run on a worker thread. |task_is_slow| |