Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1167603 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Floss: use QuitWhenIdle for thread-safety"

parents 069a7c41 cb86f7d1
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -141,12 +141,7 @@ void MessageLoopThread::ShutDown() {
    CHECK_NE(thread_id_, base::PlatformThread::CurrentId())
        << __func__ << " should not be called on the thread itself. "
        << "Otherwise, deadlock may happen.";
    if (!message_loop_->task_runner()->PostTask(
            FROM_HERE, run_loop_->QuitWhenIdleClosure())) {
      LOG(FATAL) << __func__
                 << ": failed to post task to message loop for thread "
                 << *this;
    }
    run_loop_->QuitWhenIdle();
  }
  thread_->join();
  {