mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 20:22:30 +01:00
Improve ppu_thread_cleaner a bit
Always join thread.
This commit is contained in:
parent
a58c12db0b
commit
7f28489c70
@ -28,7 +28,15 @@ struct ppu_thread_cleaner
|
||||
{
|
||||
if (u32 id = old_id.exchange(new_id)) [[likely]]
|
||||
{
|
||||
if (!idm::remove<named_thread<ppu_thread>>(id)) [[unlikely]]
|
||||
auto ppu = idm::get<named_thread<ppu_thread>>(id);
|
||||
|
||||
if (ppu)
|
||||
{
|
||||
// Join thread
|
||||
(*ppu)();
|
||||
}
|
||||
|
||||
if (!ppu || !idm::remove_verify<named_thread<ppu_thread>>(id, std::move(ppu))) [[unlikely]]
|
||||
{
|
||||
sys_ppu_thread.fatal("Failed to remove detached thread 0x%x", id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user