Chromium Code Reviews| Index: base/task_scheduler/scheduler_worker.h |
| diff --git a/base/task_scheduler/scheduler_worker.h b/base/task_scheduler/scheduler_worker.h |
| index f75d45f25db95d3f5c1009726274f30d7d1f9eab..807dc63c4c6beec08c1da46f9a166dbfda7971c4 100644 |
| --- a/base/task_scheduler/scheduler_worker.h |
| +++ b/base/task_scheduler/scheduler_worker.h |
| @@ -76,8 +76,6 @@ class BASE_EXPORT SchedulerWorker { |
| // - The next WakeUp() could be more costly due to new thread creation. |
| // - The worker will take this as a signal that it can detach, but it is not |
| // obligated to do so. |
| - // This MUST return false if SchedulerWorker::JoinForTesting() is in |
| - // progress. |
| virtual bool CanDetach(SchedulerWorker* worker) = 0; |
| // Called by a thread before it detaches. This method is not allowed to |
| @@ -117,6 +115,10 @@ class BASE_EXPORT SchedulerWorker { |
| // Joins this SchedulerWorker. If a Task is already running, it will be |
| // allowed to complete its execution. This can only be called once. |
| + // |
| + // Note: A thread which detaches itself before JoinForTesting() is called may |
|
robliao
2017/01/24 18:20:18
This might be clearer: A thread that detaches befo
fdoray
2017/01/24 20:03:51
Done.
|
| + // not exit before JoinForTesting() returns. However, it can't run tasks after |
| + // JoinForTesting() has returned. |
| void JoinForTesting(); |
| // Returns true if the worker is alive. |