Skip to content

Commit

Permalink
try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-hui committed Dec 5, 2023
1 parent 76a31f7 commit 63a7ec8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Firestore/core/src/util/schedule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

#include "Firestore/core/src/util/schedule.h"

#include <mutex>

#include "Firestore/core/src/util/hard_assert.h"
#include "Firestore/core/src/util/task.h"
#include "absl/memory/memory.h"

namespace firebase {
namespace firestore {
Expand All @@ -29,7 +30,7 @@ Schedule::~Schedule() {
}

void Schedule::Clear() {
std::unique_lock<std::mutex> lock{mutex_};
std::lock_guard<std::mutex> lock{mutex_};

for (Task* task : scheduled_) {
task->Release();
Expand Down

0 comments on commit 63a7ec8

Please sign in to comment.