Skip to content

Commit

Permalink
Rename variable and class name
Browse files Browse the repository at this point in the history
  • Loading branch information
kthui committed May 23, 2024
1 parent bc16e1a commit 3085a37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/python_be.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ ModelInstanceState::LaunchStubProcess()
thread_pool_ = std::make_unique<boost::asio::thread_pool>(
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<RequestExecutor>(
Stub()->ShmPool(), model_state->TritonServer());

Expand Down Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions src/python_be.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<IPCMessage> received_message_;
Expand All @@ -311,10 +311,10 @@ class ModelInstanceState : public BackendModelInstance {

void ResponseSendDecoupled(std::shared_ptr<IPCMessage> 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.
Expand Down

0 comments on commit 3085a37

Please sign in to comment.