mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Fix thread_base::join
This commit is contained in:
parent
c577bd2111
commit
7f5dd1dd62
1 changed files with 2 additions and 5 deletions
|
@ -1990,16 +1990,13 @@ thread_base::~thread_base()
|
||||||
|
|
||||||
bool thread_base::join() const
|
bool thread_base::join() const
|
||||||
{
|
{
|
||||||
for (auto state = m_state.load(); state != thread_state::finished;)
|
for (auto state = m_state.load(); state != thread_state::finished && state != thread_state::errored;)
|
||||||
{
|
{
|
||||||
m_state.wait(state);
|
m_state.wait(state);
|
||||||
state = m_state;
|
state = m_state;
|
||||||
|
|
||||||
if (state == thread_state::errored)
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return m_state.load() == thread_state::finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
void thread_base::notify()
|
void thread_base::notify()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue