input/InputStreams: pass std::unique_lock<> to various methods

This commit is contained in:
Max Kellermann
2019-04-26 19:19:45 +02:00
parent 040573c636
commit 1b5c1f75a4
33 changed files with 212 additions and 156 deletions

View File

@@ -292,9 +292,9 @@ read_stream_art(Response &r, const char *uri, size_t offset)
size_t read_size;
{
const std::lock_guard<Mutex> protect(mutex);
is->Seek(offset);
read_size = is->Read(&buffer, CHUNK_SIZE);
std::unique_lock<Mutex> lock(mutex);
is->Seek(lock, offset);
read_size = is->Read(lock, &buffer, CHUNK_SIZE);
}
r.Format("size: %" PRIoffset "\n"