diff --git a/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp b/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp index a048cafe49..0676c8f828 100644 --- a/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp +++ b/rpcs3/Emu/Cell/PPULLVMRecompiler.cpp @@ -559,8 +559,13 @@ void RecompilationEngine::CompileBlock(BlockEntry & block_entry) { std::lock_guard lock(m_address_locks[block_entry.cfg.start_address].first); + int loopiteration = 0; while (m_address_locks[block_entry.cfg.start_address].second.load() > 0) + { std::this_thread::yield(); + if (loopiteration++ > 10000000) + return; + } std::get<1>(m_address_to_function[block_entry.cfg.start_address]) = std::unique_ptr(compileResult.second); std::get<0>(m_address_to_function[block_entry.cfg.start_address]) = compileResult.first;