mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
re-enable threadlist in GUI
This used to crash so it was removed. However I think this is a cruicial feature. This is the only way to observe the stack-frames, registers and disasm around the PC in a user friendly way. The reason this caused crashes was that we got a reference to a std::vector and iterated over it in one thread while another thread could modify it (and thereby invalidating the iterators). The way I "fixed" it is to just copy the `std::vector<std::shared_ptr<...>>` and iterate over the copy. This obviously has some overhead (locking the shared_ptr counters and incrementing them). It also allows entities other than the Thread manager to keep the Thread objects frome being deleted but that should not be a problem.
This commit is contained in:
parent
c153215d6d
commit
13d2f8fa59
2 changed files with 6 additions and 6 deletions
|
|
@ -108,12 +108,12 @@ void InterpreterDisAsmFrame::UpdateUnitList()
|
|||
{
|
||||
m_choice_units->Freeze();
|
||||
m_choice_units->Clear();
|
||||
//auto& thrs = Emu.GetCPU().GetThreads();
|
||||
auto thrs = Emu.GetCPU().GetThreads();
|
||||
|
||||
//for (auto& t : thrs)
|
||||
//{
|
||||
// m_choice_units->Append(t->GetFName(), t.get());
|
||||
//}
|
||||
for (auto& t : thrs)
|
||||
{
|
||||
m_choice_units->Append(t->GetFName(), t.get());
|
||||
}
|
||||
|
||||
m_choice_units->Thaw();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue