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

Unified Diff: base/task_scheduler/scheduler_worker.h

Issue 2762703002: FOR REFERENCE ONLY Task Scheduler COM Task Runner (Closed)
Patch Set: Created 3 years, 9 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.h
diff --git a/base/task_scheduler/scheduler_worker.h b/base/task_scheduler/scheduler_worker.h
index 497d5dd1c6daa880566a14c60ec378f766d31fce..0fc595d4e48ad5347b9d3ba7baeca653fdd43fd6 100644
--- a/base/task_scheduler/scheduler_worker.h
+++ b/base/task_scheduler/scheduler_worker.h
@@ -42,7 +42,7 @@ class BASE_EXPORT SchedulerWorker
public:
// Delegate interface for SchedulerWorker. The methods are always called from
// the thread managed by the SchedulerWorker instance.
- class Delegate {
+ class BASE_EXPORT Delegate {
public:
virtual ~Delegate() = default;
@@ -68,6 +68,11 @@ class BASE_EXPORT SchedulerWorker
// worker's WakeUp() method is called.
virtual TimeDelta GetSleepTimeout() = 0;
+ // Called by a thread to wait for work. Override this method if the thread
+ // in question needs special handling to go to sleep. |wake_up_event| is a
+ // manually resettable event and is signaled on SchedulerWorker::WakeUp()
+ virtual void WaitForWork(WaitableEvent* wake_up_event);
+
// Called by a thread if it is allowed to detach if the last call to
// GetWork() returned nullptr.
//
« no previous file with comments | « base/task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc ('k') | base/task_scheduler/scheduler_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698