fixed queue::abort

This commit is contained in:
badaix 2016-11-09 21:57:24 +01:00
parent e875555d3c
commit 06ce37be1c
3 changed files with 23 additions and 19 deletions

View file

@ -88,8 +88,7 @@ bool Stream::waitForChunk(size_t ms) const
return true;
std::unique_lock<std::mutex> lck(cvMutex_);
cv_.wait_for(lck, std::chrono::milliseconds(ms));
return !chunks_.empty();
return (cv_.wait_for(lck, std::chrono::milliseconds(ms), [this] { return !chunks_.empty(); }));
}