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

upload video files

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