Commit ea87ee71 authored by jamesge's avatar jamesge

remove a piece of optional code in TimerThread.run, which has…

remove a piece of optional code in TimerThread.run, which has access-after-return issue and may cause the heap popped wrongly
parent 2071a22c
......@@ -367,11 +367,6 @@ void TimerThread::run() {
bool pull_again = false;
while (!tasks.empty()) {
Task* task1 = tasks[0]; // the about-to-run task
if (task1->try_delete()) { // already unscheduled
std::pop_heap(tasks.begin(), tasks.end(), task_greater);
tasks.pop_back();
continue;
}
if (butil::gettimeofday_us() < task1->run_time) { // not ready yet.
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment