FIX: test if thread is joinable before join
This commit is contained in:
parent
caa13b0159
commit
22ff983817
@ -88,8 +88,11 @@
|
|||||||
throw std::runtime_error("can not stop main thread");
|
throw std::runtime_error("can not stop main thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mainThread_->joinable())
|
||||||
|
{
|
||||||
mainThread_->join();
|
mainThread_->join();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EventManager::Manager::stopScheduling_()
|
void EventManager::Manager::stopScheduling_()
|
||||||
{
|
{
|
||||||
@ -107,8 +110,11 @@
|
|||||||
throw std::runtime_error("can not stop scheduling thread");
|
throw std::runtime_error("can not stop scheduling thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (schedulingThread_->joinable())
|
||||||
|
{
|
||||||
schedulingThread_->join();
|
schedulingThread_->join();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EventManager::Manager::start()
|
void EventManager::Manager::start()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user