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

Unified Diff: base/task_scheduler/scheduler_worker.h

Issue 2686593003: DESIGN DISCUSSION ONLY Task Scheduler Single Thread Task Runner Manager for Dedicated Threads per S… (Closed)
Patch Set: Wait for Detached Thread to Complete Created 3 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 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 f8174de971761910533b463730d993642bd2093f..bcef49bee865beea96f9e9fd1c895b71890fa7ef 100644
--- a/base/task_scheduler/scheduler_worker.h
+++ b/base/task_scheduler/scheduler_worker.h
@@ -116,6 +116,10 @@ class BASE_EXPORT SchedulerWorker {
// worker. If this happens, there will be no call to GetWork().
void WakeUp();
+ // Requests destruction of |worker| upon detachment. After this call returns,
+ // do not reference |worker| or anything provided by it.
+ static void DestroyAfterDetachment(std::unique_ptr<SchedulerWorker> worker);
+
SchedulerWorker::Delegate* delegate() { return delegate_.get(); }
// Joins this SchedulerWorker. If a Task is already running, it will be

Powered by Google App Engine
This is Rietveld 408576698