Cleanup IncomingTaskQueue Declaration
This is a refactor/no-op change. BUG=749312 Change-Id: Ic4b685d4f527adadd332a921a85bd908e6ae802b Reviewed-on: https://chromium-review.googlesource.com/648452 Commit-Queue: Gabriel Charette <gab@chromium.org> Reviewed-by: Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#502320}
This commit is contained in:
base/message_loop
@ -50,12 +50,8 @@ TimeTicks CalculateDelayedRuntime(TimeDelta delay) {
|
||||
} // namespace
|
||||
|
||||
IncomingTaskQueue::IncomingTaskQueue(MessageLoop* message_loop)
|
||||
: high_res_task_count_(0),
|
||||
message_loop_(message_loop),
|
||||
next_sequence_num_(0),
|
||||
message_loop_scheduled_(false),
|
||||
always_schedule_work_(AlwaysNotifyPump(message_loop_->type())),
|
||||
is_ready_for_scheduling_(false) {
|
||||
: always_schedule_work_(AlwaysNotifyPump(message_loop->type())),
|
||||
message_loop_(message_loop) {
|
||||
// The constructing sequence is not necessarily the running sequence in the
|
||||
// case of base::Thread.
|
||||
DETACH_FROM_SEQUENCE(sequence_checker_);
|
||||
|
@ -76,47 +76,46 @@ class BASE_EXPORT IncomingTaskQueue
|
||||
// Wakes up the message loop and schedules work.
|
||||
void ScheduleWork();
|
||||
|
||||
// Checks calls made only on the MessageLoop thread.
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
|
||||
debug::TaskAnnotator task_annotator_;
|
||||
|
||||
// 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, except
|
||||
// |message_loop_|.
|
||||
base::Lock incoming_queue_lock_;
|
||||
// True if we always need to call ScheduleWork when receiving a new task, even
|
||||
// if the incoming queue was not empty.
|
||||
const bool always_schedule_work_;
|
||||
|
||||
// Lock that protects |message_loop_| to prevent it from being deleted while
|
||||
// a request is made to schedule work.
|
||||
base::Lock message_loop_lock_;
|
||||
|
||||
// Points to the message loop that owns |this|.
|
||||
MessageLoop* message_loop_;
|
||||
|
||||
// Synchronizes access to all members below this line.
|
||||
base::Lock incoming_queue_lock_;
|
||||
|
||||
// Number of tasks that require high resolution timing. This value is kept
|
||||
// so that ReloadWorkQueue() completes in constant time.
|
||||
int high_res_task_count_ = 0;
|
||||
|
||||
// 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_|.
|
||||
TaskQueue incoming_queue_;
|
||||
|
||||
// Points to the message loop that owns |this|.
|
||||
MessageLoop* message_loop_;
|
||||
|
||||
// True if new tasks should be accepted.
|
||||
bool accept_new_tasks_ = true;
|
||||
|
||||
// The next sequence number to use for delayed tasks.
|
||||
int next_sequence_num_;
|
||||
int next_sequence_num_ = 0;
|
||||
|
||||
// True if our message loop has already been scheduled and does not need to be
|
||||
// scheduled again until an empty reload occurs.
|
||||
bool message_loop_scheduled_;
|
||||
|
||||
// True if we always need to call ScheduleWork when receiving a new task, even
|
||||
// if the incoming queue was not empty.
|
||||
const bool always_schedule_work_;
|
||||
bool message_loop_scheduled_ = false;
|
||||
|
||||
// False until StartScheduling() is called.
|
||||
bool is_ready_for_scheduling_;
|
||||
|
||||
// Checks calls made only on the MessageLoop thread.
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
bool is_ready_for_scheduling_ = false;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(IncomingTaskQueue);
|
||||
};
|
||||
|
Reference in New Issue
Block a user