[FIRE-32453][BUG-232971] Orderly shutdown of event queues
Terminate related queues before the windows thread to avoid loops. Also increase timeout on queue full wait as we don't expect to see this so often now.master
parent
6c4ba94b25
commit
0c9d4db072
|
|
@ -343,8 +343,10 @@ bool LLThreadSafeQueue<ElementT, QueueT>::pushIfOpen(T&& element)
|
|||
|
||||
// Storage Full. Wait for signal.
|
||||
// <FS:Beq> [FIRE-32453][BUG-232971] Improve shutdown behaviour. Time bound the sleep
|
||||
// When the queue is full and the consuming thread has exited we will never wake up.
|
||||
const auto timeout = std::chrono::milliseconds(50);
|
||||
// mCapacityCond.wait(lock1);
|
||||
// When the queue is full and the consuming thread has exited we would never wake up.
|
||||
// For safety, we now wait max half a second then recheck close.
|
||||
const auto timeout = std::chrono::milliseconds(500);
|
||||
mCapacityCond.wait_for(lock1, timeout);
|
||||
// </FS:Beq>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -925,6 +925,10 @@ void LLWindowWin32::close()
|
|||
// operations we're asking. That's the last time WE should touch it.
|
||||
mhDC = NULL;
|
||||
mWindowHandle = NULL;
|
||||
// <FS:Beq> [FIRE-32453][BUG-232971] close the related queues first to prevent spinning.
|
||||
mFunctionQueue.close();
|
||||
mMouseQueue.close();
|
||||
// </FS:Beq>
|
||||
mWindowThread->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue