Skip to content

Commit

Permalink
added fix to terminate the control module with the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaljain-apra committed Sep 17, 2024
1 parent 39c24b6 commit e451b05
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions base/src/PipeLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ void PipeLine::wait_for_all(bool ignoreStatus)
Module& m = *(i->get());
m.myThread.join();
}

if ((modules[0]->controlModule) != nullptr)
{
Module& m = *(modules[0]->controlModule);
m.myThread.join();
}
}


Expand All @@ -264,11 +270,24 @@ void PipeLine::interrup_wait_for_all()
m.myThread.interrupt();
}

if ((modules[0]->controlModule) != nullptr)
{
Module& m = *(modules[0]->controlModule);
m.myThread.interrupt();
}

for (auto i = modules.begin(); i != modules.end(); i++)
{
Module& m = *(i->get());
m.myThread.join();
}

if ((modules[0]->controlModule) != nullptr)
{
Module& m = *(modules[0]->controlModule);
m.myThread.join();
}

myStatus = PL_STOPPED;
}

Expand Down

0 comments on commit e451b05

Please sign in to comment.