forked from suyu/suyu
hle: nvflinger: buffer_queue_core: Cleanup locking.
This commit is contained in:
parent
650c9d0d62
commit
53058ae73f
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ BufferQueueCore::BufferQueueCore() : lock{mutex, std::defer_lock} {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BufferQueueCore::NotifyShutdown() {
|
void BufferQueueCore::NotifyShutdown() {
|
||||||
std::unique_lock<std::mutex> lk(mutex);
|
std::unique_lock lk(mutex);
|
||||||
|
|
||||||
is_shutting_down = true;
|
is_shutting_down = true;
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ bool BufferQueueCore::StillTracking(const BufferItem* item) const {
|
||||||
|
|
||||||
void BufferQueueCore::WaitWhileAllocatingLocked() const {
|
void BufferQueueCore::WaitWhileAllocatingLocked() const {
|
||||||
while (is_allocating) {
|
while (is_allocating) {
|
||||||
std::unique_lock<std::mutex> lk(mutex);
|
std::unique_lock lk(mutex);
|
||||||
is_allocating_condition.wait(lk);
|
is_allocating_condition.wait(lk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue