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

Unified Diff: base/task_scheduler/scheduler_worker_thread.h

Issue 1876363004: TaskScheduler [11] Support ExecutionMode::SINGLE_THREADED. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@8_delayed
Patch Set: add #include <algorithm> Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: base/task_scheduler/scheduler_worker_thread.h
diff --git a/base/task_scheduler/scheduler_worker_thread.h b/base/task_scheduler/scheduler_worker_thread.h
index 3022d100c61239b863c51d95b64e0252ef1360f1..5de245dcb019a3846b52e57368df2c29e84bd7da 100644
--- a/base/task_scheduler/scheduler_worker_thread.h
+++ b/base/task_scheduler/scheduler_worker_thread.h
@@ -37,8 +37,8 @@ class BASE_EXPORT SchedulerWorkerThread : public PlatformThread::Delegate {
public:
virtual ~Delegate() = default;
- // Called when the main function of the SchedulerWorkerThread enters.
- virtual void OnMainEntry() = 0;
+ // Called by |worker_thread| when it enters its main function.
+ virtual void OnMainEntry(SchedulerWorkerThread* worker_thread) = 0;
// Called by |worker_thread| to get a Sequence from which to run a Task.
virtual scoped_refptr<Sequence> GetWork(
@@ -68,6 +68,8 @@ class BASE_EXPORT SchedulerWorkerThread : public PlatformThread::Delegate {
// returned by the GetWork() method of its delegate until it returns nullptr.
void WakeUp();
+ SchedulerWorkerThread::Delegate* delegate() { return delegate_.get(); }
+
// Joins this SchedulerWorkerThread. If a Task is already running, it will be
// allowed to complete its execution. This can only be called once.
void JoinForTesting();
« no previous file with comments | « base/task_scheduler/scheduler_thread_pool_impl_unittest.cc ('k') | base/task_scheduler/scheduler_worker_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698