input/thread: use notify_one() instead of notify_all()

There's only ever one waiter, and notify_one() may be faster than
notify_all().
This commit is contained in:
Max Kellermann 2024-07-29 23:08:48 +02:00
parent 61e8df913d
commit c29d23b4c3
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ ThreadInputStream::Read(std::unique_lock<Mutex> &lock,
size_t nbytes = std::min(dest.size(), r.size());
memcpy(dest.data(), r.data(), nbytes);
buffer.Consume(nbytes);
wake_cond.notify_all();
wake_cond.notify_one();
offset += nbytes;
return nbytes;
}