Index: base/message_loop/incoming_task_queue.h |
diff --git a/base/message_loop/incoming_task_queue.h b/base/message_loop/incoming_task_queue.h |
index e450aa164fa0fb96515375da109bd7e301c9454c..02d6c74334e9be2caaf40cd2fe3946484969d496 100644 |
--- a/base/message_loop/incoming_task_queue.h |
+++ b/base/message_loop/incoming_task_queue.h |
@@ -10,6 +10,7 @@ |
#include "base/memory/ref_counted.h" |
#include "base/pending_task.h" |
#include "base/synchronization/lock.h" |
+#include "base/synchronization/rw_lock.h" |
#include "base/time/time.h" |
namespace base { |
@@ -62,25 +63,24 @@ class BASE_EXPORT IncomingTaskQueue |
friend class RefCountedThreadSafe<IncomingTaskQueue>; |
virtual ~IncomingTaskQueue(); |
- // Calculates the time at which a PendingTask should run. |
- TimeTicks CalculateDelayedRuntime(TimeDelta delay); |
- |
// Adds a task to |incoming_queue_|. The caller retains ownership of |
// |pending_task|, but this function will reset the value of |
// |pending_task->task|. This is needed to ensure that the posting call stack |
// does not retain |pending_task->task| beyond this function call. |
bool PostPendingTask(PendingTask* pending_task); |
- // Wakes up the message loop and schedules work. |
- void ScheduleWork(); |
- |
// Number of tasks that require high resolution timing. This value is kept |
// so that ReloadWorkQueue() completes in constant time. |
int high_res_task_count_; |
- // The lock that protects access to the members of this class. |
+ // The lock that protects access to the members of this class, except |
+ // |message_loop_|. |
base::Lock incoming_queue_lock_; |
+ // Lock that protects |message_loop_| to prevent it from being deleted while a |
+ // task a being posted. |
danakj
2016/05/19 21:27:43
is being
Anand Mistry (off Chromium)
2016/05/20 04:45:38
Done.
|
+ base::RWLock message_loop_lock_; |
+ |
// An incoming queue of tasks that are acquired under a mutex for processing |
// on this instance's thread. These tasks have not yet been been pushed to |
// |message_loop_|. |