提交 dd6c69a2 authored 作者: blu's avatar blu

evdameon, evcloudsvc: subsystem monitor thread and defered uploading

上级 23640138
......@@ -379,7 +379,12 @@ private:
spdlog::info("evdaemon {} failed to create subsystem {}", devSn, k);
}
}
this->bColdStart = false;
{
lock_guard<mutex> lock(this->mutSubMonitor);
this->cvSubMonitor.notify_all();
}
}
else {
// calc diff
......@@ -1076,8 +1081,11 @@ public:
while(true){
{
unique_lock<mutex> lk(this->mutSubMonitor);
this->cvSubMonitor.wait_for(lk, 5s, [this] {return !this->bColdStart;});
this->cvSubMonitor.wait(lk, [this] {return !this->bColdStart;});
}
/// anti frequent restart
this_thread::sleep_for(10s);
vector<string> tmp;
json unkown;
vector<string> terms;
......@@ -1145,7 +1153,6 @@ public:
}
}
}
}
});
this->thIdMain = this_thread::get_id();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论