| Index: base/threading/worker_pool.h
|
| diff --git a/base/threading/worker_pool.h b/base/threading/worker_pool.h
|
| index 6694830e7d7a560612bf48b5b6ed279737fa3964..93beeebd637d7f29331f8a3b286a2b185f98dcc7 100644
|
| --- a/base/threading/worker_pool.h
|
| +++ b/base/threading/worker_pool.h
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/base_export.h"
|
| #include "base/callback_forward.h"
|
| +#include "base/memory/ref_counted.h"
|
|
|
| class Task;
|
|
|
| @@ -17,6 +18,8 @@ class Location;
|
|
|
| namespace base {
|
|
|
| +class TaskRunner;
|
| +
|
| // This is a facility that runs tasks that don't require a specific thread or
|
| // a message loop.
|
| //
|
| @@ -41,6 +44,16 @@ class BASE_EXPORT WorkerPool {
|
| const Closure& task,
|
| const Closure& reply,
|
| bool task_is_slow);
|
| +
|
| + // Return true if the current thread is one that this WorkerPool runs tasks
|
| + // on. (Note that if the Windows worker pool is used without going through
|
| + // this WorkerPool interface, RunsTasksOnCurrentThread would return false on
|
| + // those threads.)
|
| + static bool RunsTasksOnCurrentThread();
|
| +
|
| + // Get a TaskRunner wrapper which posts to the WorkerPool using the given
|
| + // |task_is_slow| behavior.
|
| + static const scoped_refptr<TaskRunner>& GetTaskRunner(bool task_is_slow);
|
| };
|
|
|
| } // namespace base
|
|
|