OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_TASK_SCHEDULER_POST_TASK_H_ | 5 #ifndef BASE_TASK_SCHEDULER_POST_TASK_H_ |
6 #define BASE_TASK_SCHEDULER_POST_TASK_H_ | 6 #define BASE_TASK_SCHEDULER_POST_TASK_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/memory/ref_counted.h" | |
11 | |
12 // To avoid redundant includes: users may omit including the following headers | |
robliao
2016/11/02 17:06:25
https://google.github.io/styleguide/cppguide.html#
gab
2016/11/02 18:18:33
Done.
| |
13 // if they are using their provided data types solely in direct interactions | |
14 // with the post_task.h API. | |
10 #include "base/location.h" | 15 #include "base/location.h" |
11 #include "base/memory/ref_counted.h" | |
12 #include "base/sequenced_task_runner.h" | 16 #include "base/sequenced_task_runner.h" |
13 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
14 #include "base/task_runner.h" | 18 #include "base/task_runner.h" |
15 #include "base/task_scheduler/task_traits.h" | 19 #include "base/task_scheduler/task_traits.h" |
16 | 20 |
17 namespace base { | 21 namespace base { |
18 | 22 |
19 // This is the preferred interface to post tasks to the TaskScheduler. | 23 // This is the preferred interface to post tasks to the TaskScheduler. |
20 // | 24 // |
21 // Note: The TaskScheduler is still in an experimental phase in Chrome. Please | 25 // Note: The TaskScheduler is still in an experimental phase in Chrome. Please |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 // CreateSequencedTaskRunnerWithTraits(). Only use this if you rely on a thread- | 109 // CreateSequencedTaskRunnerWithTraits(). Only use this if you rely on a thread- |
106 // affine API (it might be safer to assume thread-affinity when dealing with | 110 // affine API (it might be safer to assume thread-affinity when dealing with |
107 // under-documented third-party APIs, e.g. other OS') or share data across tasks | 111 // under-documented third-party APIs, e.g. other OS') or share data across tasks |
108 // using thread-local storage. | 112 // using thread-local storage. |
109 BASE_EXPORT scoped_refptr<SingleThreadTaskRunner> | 113 BASE_EXPORT scoped_refptr<SingleThreadTaskRunner> |
110 CreateSingleThreadTaskRunnerWithTraits(const TaskTraits& traits); | 114 CreateSingleThreadTaskRunnerWithTraits(const TaskTraits& traits); |
111 | 115 |
112 } // namespace base | 116 } // namespace base |
113 | 117 |
114 #endif // BASE_TASK_SCHEDULER_POST_TASK_H_ | 118 #endif // BASE_TASK_SCHEDULER_POST_TASK_H_ |
OLD | NEW |