MusicPipe: lock the mutex in Peek() and GetSize()
This commit is contained in:
parent
6a8c2848f6
commit
5d6a8b3840
@ -95,6 +95,7 @@ public:
|
||||
*/
|
||||
gcc_pure
|
||||
const MusicChunk *Peek() const noexcept {
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
return head;
|
||||
}
|
||||
|
||||
@ -120,6 +121,7 @@ public:
|
||||
*/
|
||||
gcc_pure
|
||||
unsigned GetSize() const noexcept {
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user