LibIPC: Handle spurious wake-ups on the send queue thread

Fixes #1441
This commit is contained in:
Andreas Kling 2024-09-21 15:36:45 +02:00 committed by Andreas Kling
parent a0ed12e839
commit 44f672bacf
Notes: github-actions[bot] 2024-09-21 13:51:02 +00:00

View file

@ -35,7 +35,7 @@ ConnectionBase::ConnectionBase(IPC::Stub& local_stub, NonnullOwnPtr<Core::LocalS
m_send_thread = Threading::Thread::construct([this, queue = m_send_queue]() -> intptr_t {
for (;;) {
queue->mutex.lock();
if (queue->messages.is_empty())
while (queue->messages.is_empty() && queue->running)
queue->condition.wait();
if (!queue->running) {