input/buffering: use notify_one() to wake up thread

There is just one thread.
This commit is contained in:
Max Kellermann 2019-05-17 11:57:23 +02:00
parent 16a07bc201
commit 813567bf5c
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ BufferingInputStream::~BufferingInputStream() noexcept
{
const std::lock_guard<Mutex> lock(mutex);
stop = true;
wake_cond.notify_all();
wake_cond.notify_one();
}
thread.Join();
@ -73,7 +73,7 @@ BufferingInputStream::Seek(std::unique_lock<Mutex> &lock, size_t new_offset)
seek_offset = new_offset;
seek = true;
wake_cond.notify_all();
wake_cond.notify_one();
client_cond.wait(lock, [this]{ return !seek; });