From 17f8bbad7b4af9fe5a297cb9f58557ce75fbd907 Mon Sep 17 00:00:00 2001 From: Sergey Shevchenko Date: Tue, 23 Jul 2024 10:18:19 -0700 Subject: [PATCH] Google-specific change. PiperOrigin-RevId: 655211676 --- centipede/periodic_action.cc | 8 ++++---- centipede/periodic_action.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/centipede/periodic_action.cc b/centipede/periodic_action.cc index 0d0427a4..f4192bce 100644 --- a/centipede/periodic_action.cc +++ b/centipede/periodic_action.cc @@ -39,11 +39,11 @@ PeriodicAction::~PeriodicAction() { Stop(); } void PeriodicAction::Stop() { StopAsync(); + // The run-loop should exit the next time it checks `stop_`. Note that if + // the loop is currently in the middle of an invocation of `action_`, it + // will wait for the invocation to finish, so we might block here for an + // `action_`-dependent amount of time. if (thread_.joinable()) { - // The run-loop should exit the next time it checks `stop_`. Note that if - // the loop is currently in the middle of an invocation of `action_`, it - // will wait for the invocation to finish, so we might block here for an - // `action_`-dependent amount of time. thread_.join(); } } diff --git a/centipede/periodic_action.h b/centipede/periodic_action.h index 2fcf5c7c..4cc4f254 100644 --- a/centipede/periodic_action.h +++ b/centipede/periodic_action.h @@ -33,8 +33,7 @@ #ifndef FUZZTEST_CENTIPEDE_PERIODIC_ACTION_H_ #define FUZZTEST_CENTIPEDE_PERIODIC_ACTION_H_ -#include -#include // NOLINT +#include #include "absl/base/thread_annotations.h" #include "absl/functional/any_invocable.h"