From f9a0244c5bd2a3a83113fa6c659772b15038f416 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Tue, 8 Aug 2023 18:36:05 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 555005770 --- mediapipe/framework/scheduler.cc | 7 ------- mediapipe/framework/scheduler.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/mediapipe/framework/scheduler.cc b/mediapipe/framework/scheduler.cc index ceadce787..23dc684cc 100644 --- a/mediapipe/framework/scheduler.cc +++ b/mediapipe/framework/scheduler.cc @@ -270,13 +270,6 @@ absl::Status Scheduler::WaitForObservedOutput() { return observed ? absl::OkStatus() : absl::OutOfRangeError("Graph is done."); } -// Idleness requires: -// 1. either the graph has no source nodes or all source nodes are closed, and -// 2. no packets are added to graph input streams. -// For simplicity, we only fully support WaitUntilIdle() to be called on a graph -// with no source nodes. -// The application must ensure no other threads are adding packets to graph -// input streams while a WaitUntilIdle() call is in progress. absl::Status Scheduler::WaitUntilIdle() { RET_CHECK_NE(state_, STATE_NOT_STARTED); ApplicationThreadAwait(std::bind(&Scheduler::IsIdle, this)); diff --git a/mediapipe/framework/scheduler.h b/mediapipe/framework/scheduler.h index 8a6d079e3..22d552c71 100644 --- a/mediapipe/framework/scheduler.h +++ b/mediapipe/framework/scheduler.h @@ -76,6 +76,16 @@ class Scheduler { // be scheduled and nothing is running in the worker threads. This function // can be called only after Start(). // Runs application thread tasks while waiting. + // + // Idleness requires: + // 1. either the graph has no source nodes or all source nodes are closed, and + // 2. no packets are added to graph input streams. + // + // For simplicity, we only fully support WaitUntilIdle() to be called on a + // graph with no source nodes. + // + // The application must ensure no other threads are adding packets to graph + // input streams while a WaitUntilIdle() call is in progress. absl::Status WaitUntilIdle() ABSL_LOCKS_EXCLUDED(state_mutex_); // Wait until any graph input stream has been unthrottled.