Explorar o código

Use immediate rather than min time to avoid overflow (#5811)

Gil %!s(int64=5) %!d(string=hai) anos
pai
achega
ee68614ba0
Modificáronse 1 ficheiros con 1 adicións e 7 borrados
  1. 1 7
      Firestore/core/src/util/executor_std.cc

+ 1 - 7
Firestore/core/src/util/executor_std.cc

@@ -41,12 +41,6 @@ Executor::TimePoint Immediate() {
   return Executor::TimePoint{};
 }
 
-// The minimum time point, used to enqueue things at the absolute front of the
-// schedule.
-Executor::TimePoint Min() {
-  return Executor::TimePoint{Executor::TimePoint::duration::min()};
-}
-
 // The only guarantee is that different `thread_id`s will produce different
 // values.
 std::string ThreadIdToString(const std::thread::id thread_id) {
@@ -99,7 +93,7 @@ void ExecutorStd::Dispose() {
   // this destructor, the kShutdownTag Task will execute after the destructor
   // completes.
   for (size_t i = 0; i < worker_thread_pool_.size(); ++i) {
-    PushOnScheduleLocked(Min(), kShutdownTag, [] {});
+    PushOnScheduleLocked(Immediate(), kShutdownTag, [] {});
   }
 
   state_ = nullptr;