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

Unified Diff: base/task_scheduler/scheduler_worker_thread.h

Issue 1869803002: TaskScheduler: Small improvements in SchedulerWorkerThread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2_gab_unittest_comments
Patch Set: 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
« no previous file with comments | « no previous file | base/task_scheduler/scheduler_worker_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fa1060dd33088cb2fc586a1bbb9144ee5465787c..775f41174df4aa6dcfa5d8fbae2756f98c4fb24f 100644
--- a/base/task_scheduler/scheduler_worker_thread.h
+++ b/base/task_scheduler/scheduler_worker_thread.h
@@ -23,11 +23,11 @@ class TaskTracker;
// A thread that runs Tasks from Sequences returned by a delegate.
//
-// A SchedulerWorkerThread is woken up when its WakeUp() method is called. After
-// a wake-up, a SchedulerWorkerThread runs Tasks from Sequences returned by the
-// GetWork() method of its delegate as long as it doesn't return nullptr. It
-// also periodically checks with its TaskTracker whether shutdown has completed
-// and exits when it has.
+// A SchedulerWorkerThread starts out sleeping. It is woken up by a call to
+// WakeUp(). After a wake-up, a SchedulerWorkerThread runs Tasks from Sequences
+// returned by the GetWork() method of its delegate as long as it doesn't return
+// nullptr. It also periodically checks with its TaskTracker whether shutdown
+// has completed and exits when it has.
//
// This class is thread-safe.
class BASE_EXPORT SchedulerWorkerThread : public PlatformThread::Delegate {
@@ -46,9 +46,9 @@ class BASE_EXPORT SchedulerWorkerThread : public PlatformThread::Delegate {
// has returned.
~SchedulerWorkerThread() override;
- // Wakes up this SchedulerWorkerThread. After this is called, this
- // SchedulerWorkerThread will run Tasks from Sequences returned by the
- // GetWork() method of its delegate until it returns nullptr.
+ // Wakes up this SchedulerWorkerThread if it wasn't already awake. After this
+ // is called, this SchedulerWorkerThread will run Tasks from Sequences
+ // returned by the GetWork() method of its delegate until it returns nullptr.
void WakeUp();
// Joins this SchedulerWorkerThread. If a Task is already running, it will be
« no previous file with comments | « no previous file | base/task_scheduler/scheduler_worker_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698