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

Side by Side Diff: base/task_scheduler/scheduler_thread_pool.h

Issue 2076153002: [TaskScheduler] Support TaskRunnerHandles from parallel tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mix_c_Ab
Patch Set: Created 4 years, 6 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 | « no previous file | base/task_scheduler/scheduler_thread_pool_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SCHEDULER_THREAD_POOL_H_ 5 #ifndef BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_H_
6 #define BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_H_ 6 #define BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 27 matching lines...) Expand all
38 // SchedulerThreadPool. 38 // SchedulerThreadPool.
39 virtual void ReEnqueueSequence(scoped_refptr<Sequence> sequence, 39 virtual void ReEnqueueSequence(scoped_refptr<Sequence> sequence,
40 const SequenceSortKey& sequence_sort_key) = 0; 40 const SequenceSortKey& sequence_sort_key) = 0;
41 41
42 // Posts |task| to be executed by this SchedulerThreadPool as part of 42 // Posts |task| to be executed by this SchedulerThreadPool as part of
43 // |sequence|. If |worker_thread| is non-null, |task| will be scheduled to run 43 // |sequence|. If |worker_thread| is non-null, |task| will be scheduled to run
44 // on it specifically (note: |worker_thread| must be owned by this 44 // on it specifically (note: |worker_thread| must be owned by this
45 // SchedulerThreadPool); otherwise, |task| will be added to the pending shared 45 // SchedulerThreadPool); otherwise, |task| will be added to the pending shared
46 // work. |task| won't be executed before its delayed run time, if any. Returns 46 // work. |task| won't be executed before its delayed run time, if any. Returns
47 // true if |task| is posted. 47 // true if |task| is posted.
48 //FIXME: Remove from public interface?
48 virtual bool PostTaskWithSequence(std::unique_ptr<Task> task, 49 virtual bool PostTaskWithSequence(std::unique_ptr<Task> task,
49 scoped_refptr<Sequence> sequence, 50 scoped_refptr<Sequence> sequence,
50 SchedulerWorkerThread* worker_thread) = 0; 51 SchedulerWorkerThread* worker_thread) = 0;
51 52
52 // Posts |task| to be executed by this SchedulerThreadPool as part of 53 // Posts |task| to be executed by this SchedulerThreadPool as part of
53 // |sequence|. If |worker_thread| is non-null, |task| will be scheduled to run 54 // |sequence|. If |worker_thread| is non-null, |task| will be scheduled to run
54 // on it specifically (note: |worker_thread| must be owned by this 55 // on it specifically (note: |worker_thread| must be owned by this
55 // SchedulerThreadPool); otherwise, |task| will be added to the pending shared 56 // SchedulerThreadPool); otherwise, |task| will be added to the pending shared
56 // work. This must only be called after |task| has gone through 57 // work. This must only be called after |task| has gone through
57 // PostTaskWithSequence() and after |task|'s delayed run time. 58 // PostTaskWithSequence() and after |task|'s delayed run time.
58 virtual void PostTaskWithSequenceNow( 59 virtual void PostTaskWithSequenceNow(
59 std::unique_ptr<Task> task, 60 std::unique_ptr<Task> task,
60 scoped_refptr<Sequence> sequence, 61 scoped_refptr<Sequence> sequence,
61 SchedulerWorkerThread* worker_thread) = 0; 62 SchedulerWorkerThread* worker_thread) = 0;
62 }; 63 };
63 64
64 } // namespace internal 65 } // namespace internal
65 } // namespace base 66 } // namespace base
66 67
67 #endif // BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_H_ 68 #endif // BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_H_
OLDNEW
« no previous file with comments | « no previous file | base/task_scheduler/scheduler_thread_pool_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698