mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
Try to purge thread_state::detached
It's rarely necessary, but can cause unexpected problems.
This commit is contained in:
parent
cb047fcc75
commit
490f58ff3c
5 changed files with 31 additions and 31 deletions
|
@ -1858,11 +1858,13 @@ bool thread_base::finalize(int) noexcept
|
|||
fsoft, fhard, ctxvol, ctxinv);
|
||||
|
||||
// Return true if need to delete thread object
|
||||
const bool result = m_state.exchange(thread_state::finished) == thread_state::detached;
|
||||
const bool ok = m_state.exchange(thread_state::finished) <= thread_state::aborting;
|
||||
|
||||
// Signal waiting threads
|
||||
m_state.notify_all();
|
||||
return result;
|
||||
|
||||
// No detached thread supported atm
|
||||
return !ok;
|
||||
}
|
||||
|
||||
void thread_base::finalize() noexcept
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue