From 63a7ec8d763da9a52d58a441c844cdcec98fb93d Mon Sep 17 00:00:00 2001 From: Wu-Hui Date: Tue, 5 Dec 2023 14:45:59 -0500 Subject: [PATCH] try fix --- Firestore/core/src/util/schedule.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Firestore/core/src/util/schedule.cc b/Firestore/core/src/util/schedule.cc index 2a7a9bb33ba..d2d95c23117 100644 --- a/Firestore/core/src/util/schedule.cc +++ b/Firestore/core/src/util/schedule.cc @@ -16,9 +16,10 @@ #include "Firestore/core/src/util/schedule.h" +#include + #include "Firestore/core/src/util/hard_assert.h" #include "Firestore/core/src/util/task.h" -#include "absl/memory/memory.h" namespace firebase { namespace firestore { @@ -29,7 +30,7 @@ Schedule::~Schedule() { } void Schedule::Clear() { - std::unique_lock lock{mutex_}; + std::lock_guard lock{mutex_}; for (Task* task : scheduled_) { task->Release();