mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-05 17:58:28 +02:00
Fix deadlock in background translation thread shutdown (#7239)
TryDequeue checks for _disposed before taking the lock. If another thread calls Dispose before it takes the lock, it won't get woken up by the PulseAll call, and will deadlock in Monitor.Wait. Double-checking _disposed with the lock taken should avoid this.
This commit is contained in:
@@ -80,9 +80,12 @@ namespace ARMeilleure.Translation
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!_disposed)
|
||||
{
|
||||
Monitor.Wait(Sync);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result = default;
|
||||
|
||||
|
Reference in New Issue
Block a user