From 3085a37a60ff1f9a65a9b79ddc4bd3f0442bf7c3 Mon Sep 17 00:00:00 2001 From: kthui <18255193+kthui@users.noreply.github.com> Date: Wed, 22 May 2024 22:36:13 -0700 Subject: [PATCH] Rename variable and class name --- src/python_be.cc | 8 ++++---- src/python_be.h | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/python_be.cc b/src/python_be.cc index ce03adc7..d5657b30 100644 --- a/src/python_be.cc +++ b/src/python_be.cc @@ -322,9 +322,9 @@ ModelInstanceState::LaunchStubProcess() thread_pool_ = std::make_unique( model_state->StateForBackend()->thread_pool_size); - decoupled_thread_ = true; + queue_monitor_thread_ = true; decoupled_monitor_ = - std::thread(&ModelInstanceState::DecoupledMessageQueueMonitor, this); + std::thread(&ModelInstanceState::MessageQueueMonitor, this); request_executor_ = std::make_unique( Stub()->ShmPool(), model_state->TritonServer()); @@ -677,9 +677,9 @@ ModelInstanceState::ExecuteBLSRequest( } void -ModelInstanceState::DecoupledMessageQueueMonitor() +ModelInstanceState::MessageQueueMonitor() { - while (decoupled_thread_) { + while (queue_monitor_thread_) { bi::managed_external_buffer::handle_t handle = Stub()->ParentMessageQueue()->Pop(); if (handle == DUMMY_MESSAGE) { diff --git a/src/python_be.h b/src/python_be.h index 78522f5d..46c93012 100644 --- a/src/python_be.h +++ b/src/python_be.h @@ -289,7 +289,7 @@ class ModelInstanceState : public BackendModelInstance { bool stub_to_parent_thread_; // Decoupled monitor thread std::thread decoupled_monitor_; - bool decoupled_thread_; + bool queue_monitor_thread_; std::mutex mu_; std::condition_variable cv_; std::unique_ptr received_message_; @@ -311,10 +311,10 @@ class ModelInstanceState : public BackendModelInstance { void ResponseSendDecoupled(std::shared_ptr response_send_message); - // In the decoupled mode, the parent message queue is monitored only by this - // function during the execute phase. No other thread should pop any message - // from the message queue in the decoupled mode. - void DecoupledMessageQueueMonitor(); + // The parent message queue is monitored only by this function during the + // execute phase. No other thread should pop any message from the message + // queue. + void MessageQueueMonitor(); // This function is executed on a separate thread and monitors the queue for // message sent from stub to parent process.