Skip to content

Commit

Permalink
fix(task_manager): prevent multiple starts of the task manager
Browse files Browse the repository at this point in the history
  • Loading branch information
jr0me committed Dec 11, 2024
1 parent 3bc09c5 commit 5b9d775
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/agent/task_manager/src/task_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ TaskManager::TaskManager() {}

void TaskManager::Start(size_t numThreads)
{
if (m_work || m_threads.size() > 0)
{
LogError("Task manager already started");
return;
}

m_work = std::make_unique<boost::asio::executor_work_guard<boost::asio::io_context::executor_type>>(
boost::asio::make_work_guard(m_ioContext));

Expand Down

0 comments on commit 5b9d775

Please sign in to comment.