input/InputStreams: pass std::unique_lock<> to various methods
This commit is contained in:
@@ -80,13 +80,14 @@ IcyInputStream::ReadTag() noexcept
|
||||
}
|
||||
|
||||
size_t
|
||||
IcyInputStream::Read(void *ptr, size_t read_size)
|
||||
IcyInputStream::Read(std::unique_lock<Mutex> &lock,
|
||||
void *ptr, size_t read_size)
|
||||
{
|
||||
if (!IsEnabled())
|
||||
return ProxyInputStream::Read(ptr, read_size);
|
||||
return ProxyInputStream::Read(lock, ptr, read_size);
|
||||
|
||||
while (true) {
|
||||
size_t nbytes = ProxyInputStream::Read(ptr, read_size);
|
||||
size_t nbytes = ProxyInputStream::Read(lock, ptr, read_size);
|
||||
if (nbytes == 0)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user