diff options
Diffstat (limited to 'cc/base/worker_pool.h')
-rw-r--r-- | cc/base/worker_pool.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cc/base/worker_pool.h b/cc/base/worker_pool.h index 7675567..aa49ec9 100644 --- a/cc/base/worker_pool.h +++ b/cc/base/worker_pool.h @@ -51,12 +51,10 @@ class CC_EXPORT WorkerPool { virtual ~WorkerPool(); static scoped_ptr<WorkerPool> Create( - WorkerPoolClient* client, size_t num_threads, base::TimeDelta check_for_completed_tasks_delay, const std::string& thread_name_prefix) { - return make_scoped_ptr(new WorkerPool(client, - num_threads, + return make_scoped_ptr(new WorkerPool(num_threads, check_for_completed_tasks_delay, thread_name_prefix)); } @@ -69,9 +67,13 @@ class CC_EXPORT WorkerPool { // is posted to the thread that called PostTaskAndReply(). void PostTaskAndReply(const Callback& task, const base::Closure& reply); + // Set a new client. + void SetClient(WorkerPoolClient* client) { + client_ = client; + } + protected: - WorkerPool(WorkerPoolClient* client, - size_t num_threads, + WorkerPool(size_t num_threads, base::TimeDelta check_for_completed_tasks_delay, const std::string& thread_name_prefix); |