diff --git a/internal/platform/monitored_runnable.cc b/internal/platform/monitored_runnable.cc index e0952298..792a580f 100644 --- a/internal/platform/monitored_runnable.cc +++ b/internal/platform/monitored_runnable.cc @@ -16,11 +16,13 @@ #include +// TODO: Support thread status #include "internal/platform/logging.h" #include "internal/platform/pending_job_registry.h" -namespace nearby { +#define SET_THREAD_STATUS(NAME) +namespace nearby { namespace { absl::Duration kMinReportedStartDelay = absl::Seconds(5); absl::Duration kMinReportedTaskDuration = absl::Seconds(10); @@ -36,6 +38,7 @@ MonitoredRunnable::MonitoredRunnable(const std::string& name, } void MonitoredRunnable::operator()() { + SET_THREAD_STATUS(name_.c_str()); auto start_time = SystemClock::ElapsedRealtime(); auto start_delay = start_time - post_time_; if (start_delay >= kMinReportedStartDelay) {