| Index: base/task_scheduler/post_task.h
|
| diff --git a/base/task_scheduler/post_task.h b/base/task_scheduler/post_task.h
|
| index 8b3e7dfa05b56a7757625f3cec75486ba4401f97..3174f06d63b11369079b84791aea2fb425bd23eb 100644
|
| --- a/base/task_scheduler/post_task.h
|
| +++ b/base/task_scheduler/post_task.h
|
| @@ -23,9 +23,6 @@ namespace base {
|
|
|
| // This is the preferred interface to post tasks to the TaskScheduler.
|
| //
|
| -// TaskScheduler must have been registered for the current process via
|
| -// TaskScheduler::SetInstance() before the functions below are valid.
|
| -//
|
| // To post a simple one-off task with default traits:
|
| // PostTask(FROM_HERE, Bind(...));
|
| //
|
| @@ -62,6 +59,13 @@ namespace base {
|
| // registered TaskScheduler (i.e. not on the main thread). Tasks posted through
|
| // functions below with a delay may be coalesced (i.e. delays may be adjusted to
|
| // reduce the number of wakeups and hence power consumption).
|
| +//
|
| +// Prerequisite: A TaskScheduler must have been registered for the current
|
| +// process via TaskScheduler::SetInstance() before the functions below are
|
| +// valid. This is typically done during the initialization phase in each
|
| +// process. If your code is not running in that phase, you most likely don't
|
| +// have to worry about this. You will encounter DCHECKs or nullptr dereferences
|
| +// if this is violated. For tests, prefer base::test::ScopedTaskScheduler.
|
|
|
| // Posts |task| to the TaskScheduler. Calling this is equivalent to calling
|
| // PostTaskWithTraits with plain TaskTraits.
|
|
|