Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: base/task_scheduler/post_task.cc

Issue 1698183005: Reference CL for the new task scheduler. (Closed) Base URL: https://luckyluke-private.googlesource.com/src@bigmaster2
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/task_scheduler/post_task.h ('k') | base/task_scheduler/priority_queue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/task_scheduler/post_task.h"
6
7 #include "base/task_scheduler/task_scheduler.h"
8
9 namespace base {
10
11 void PostTask(const tracked_objects::Location& from_here, const Closure& task) {
12 PostTaskWithTraits(from_here, TaskTraits(), task);
13 }
14
15 void PostTaskAndReply(const tracked_objects::Location& from_here,
16 const Closure& task,
17 const Closure& reply) {
18 PostTaskWithTraitsAndReply(from_here, TaskTraits(), task, reply);
19 }
20
21 void PostTaskWithTraits(const tracked_objects::Location& from_here,
22 TaskTraits traits,
23 const Closure& task) {
24 TaskScheduler::GetInstance()->PostTaskWithTraits(from_here, traits, task);
25 }
26
27 void PostTaskWithTraitsAndReply(const tracked_objects::Location& from_here,
28 TaskTraits traits,
29 const Closure& task,
30 const Closure& reply) {
31 // TODO: Post and reply wrapper.
32 NOTIMPLEMENTED();
33 }
34
35 scoped_refptr<TaskRunner> CreateTaskRunnerWithTraits(
36 TaskTraits traits,
37 ExecutionMode execution_mode) {
38 return TaskScheduler::GetInstance()->CreateTaskRunnerWithTraits(
39 traits, execution_mode);
40 }
41
42 } // namespace base
OLDNEW
« no previous file with comments | « base/task_scheduler/post_task.h ('k') | base/task_scheduler/priority_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698