Commit b5a50bb8 authored by Philippe Gorley's avatar Philippe Gorley

smartools: add destructor to call ThreadLoop::join()

Change-Id: I31c5103f78fa2516eff930ed874856589206b9c7
parent 3ad05a07
......@@ -39,6 +39,11 @@ Smartools::Smartools()
: loop_([this] { return true; }, [this] { process(); }, [] {})
{}
Smartools::~Smartools()
{
loop_.join();
}
void
Smartools::sendInfo()
{
......
......@@ -40,6 +40,7 @@ class Smartools
private:
Smartools();
~Smartools();
void process();
std::map<std::string, std::string> information_;
std::mutex mutexInfo_; // Protect information_ from multithreading
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment