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

@ -115,7 +115,7 @@ bool PcmStream::sleep(int32_t ms)
if (ms < 0)
return true;
std::unique_lock<std::mutex> lck(mtx_);
return (cv_.wait_for(lck, std::chrono::milliseconds(ms)) == std::cv_status::timeout);
return (!cv_.wait_for(lck, std::chrono::milliseconds(ms), [this] { return !active_; }));
}