Fix potential circular queue submission race

If a producer thread was waiting for the queue to have free space and the consumer thread hadn't yet acquired the production mutex a deadlock could occur
This commit is contained in:
Billy Laws 2022-11-10 21:48:08 +00:00
parent 13baf2312f
commit e1bbd521d9

View File

@ -57,7 +57,7 @@ namespace skyline {
while (true) {
if (start == end) {
std::unique_lock lock(productionMutex);
std::unique_lock lock{consumptionMutex};
TRACE_EVENT_END("containers");
preWait();