Chromium Code Reviews| Index: base/task_scheduler/post_task.h |
| diff --git a/base/task_scheduler/post_task.h b/base/task_scheduler/post_task.h |
| index 3174f06d63b11369079b84791aea2fb425bd23eb..024e242771eccab2cfb0dad490174c9b29579d31 100644 |
| --- a/base/task_scheduler/post_task.h |
| +++ b/base/task_scheduler/post_task.h |
| @@ -18,6 +18,7 @@ |
| #include "base/task_runner.h" |
| #include "base/task_scheduler/task_traits.h" |
| #include "base/time/time.h" |
| +#include "build/build_config.h" |
| namespace base { |
| @@ -171,6 +172,17 @@ CreateSequencedTaskRunnerWithTraits(const TaskTraits& traits); |
| BASE_EXPORT scoped_refptr<SingleThreadTaskRunner> |
| CreateSingleThreadTaskRunnerWithTraits(const TaskTraits& traits); |
| +#if defined(OS_WIN) |
| +// Returns a SingleThreadTaskRunner whose PostTask invocations result in |
| +// scheduling tasks using |traits| in a COM Single-Threaded Apartment. Tasks run |
| +// in the same Single-Threaded Apartment in posting order for the returned |
| +// SingleThreadTaskRunner. Different SingleThreadTaskRunners may be associated |
|
fdoray
2017/03/27 20:11:50
// The Single-Threaded Apartment assigned to the r
robliao
2017/03/27 20:28:05
Changed the note to...
There is not necessarily a
|
| +// with different Single-Threaded Apartments so care should be taken to make |
| +// sure COM pointers are not smuggled across apartments. |
| +BASE_EXPORT scoped_refptr<SingleThreadTaskRunner> |
| +CreateCOMSTATaskRunnerWithTraits(const TaskTraits& traits); |
| +#endif // defined(OS_WIN) |
| + |
| } // namespace base |
| #endif // BASE_TASK_SCHEDULER_POST_TASK_H_ |