mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
Logging: Don't lock the queue for the duration of the write
This commit is contained in:
parent
b30c5370b1
commit
6daebaaa57
|
@ -83,8 +83,10 @@ private:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
while (true) {
|
while (true) {
|
||||||
|
{
|
||||||
std::unique_lock<std::mutex> lock(message_mutex);
|
std::unique_lock<std::mutex> lock(message_mutex);
|
||||||
message_cv.wait(lock, [&] { return !running || message_queue.Pop(entry); });
|
message_cv.wait(lock, [&] { return !running || message_queue.Pop(entry); });
|
||||||
|
}
|
||||||
if (!running) {
|
if (!running) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue