fix(modules): move join in a new method
This commit is contained in:
parent
e5ab7e1c00
commit
2b1eb5337c
4 changed files with 20 additions and 10 deletions
src/components
|
@ -74,7 +74,11 @@ controller::~controller() {
|
|||
m_log.trace("controller: Stop modules");
|
||||
for (auto&& module : m_modules) {
|
||||
auto module_name = module->name();
|
||||
auto cleanup_ms = time_util::measure([&module] { module->stop(); });
|
||||
auto cleanup_ms = time_util::measure([&module] {
|
||||
module->stop();
|
||||
module->join();
|
||||
module.reset();
|
||||
});
|
||||
m_log.info("Deconstruction of %s took %lu ms.", module_name, cleanup_ms);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue