提交 3f205f80 authored 作者: blu's avatar blu

upload video files

上级 03fd2975
......@@ -111,7 +111,7 @@ private:
if(eventQueue.size() > MAX_EVENT_QUEUE_SIZE) {
eventQueue.pop();
}
//cvEvent.notify_one();
cvEvent.notify_one();
}else{
spdlog::error("evslicer {} msg not supported from {}: {}", selfId, peerId, msg);
}
......@@ -805,19 +805,15 @@ public:
while(true)
{
string evt;
// unique_lock<mutex> lk(this->mutEvent);
// this->cvEvent.wait(lk, [this] {return !(this->eventQueue.empty());});
unique_lock<mutex> lk(this->mutEvent);
this->cvEvent.wait(lk, [this] {return !(this->eventQueue.empty());});
if(!this->eventQueue.empty()){
lock_guard<mutex> lk(this->mutEvent);
if(!this->eventQueue.empty()) {
evt = this->eventQueue.front();
this->eventQueue.pop();
}
}
if(evt.empty()){
this_thread::sleep_for(chrono::seconds(5));
continue;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论