Feature: when not running, return anyway

pull/221/head
xufuji456 2 years ago
parent 7bca2d29b5
commit 5d52f71258
  1. 4
      Live/src/main/cpp/safe_queue.h

@ -62,7 +62,9 @@ public:
int ret = 0;
#ifdef C11
unique_lock<mutex> lk(mt);
cv.wait(lk,[this]{return !work || !q.empty();});
if (!work) {
return ret;
}
if (!q.empty()) {
value = q.front();
q.pop();

Loading…
Cancel
Save