Better thread exit check

This commit is contained in:
momo5502
2025-01-18 19:37:43 +01:00
parent a16c17669d
commit 270dbf000c
2 changed files with 9 additions and 2 deletions

View File

@@ -638,7 +638,7 @@ namespace
const auto* t = c.threads.get(h);
if (t)
{
return t->exit_status.has_value();
return t->is_terminated();
}
break;
@@ -693,9 +693,14 @@ void emulator_thread::mark_as_ready(const NTSTATUS status)
this->waiting_for_alert = false;
}
bool emulator_thread::is_terminated() const
{
return this->exit_status.has_value();
}
bool emulator_thread::is_thread_ready(windows_emulator& win_emu)
{
if (this->exit_status.has_value())
if (this->is_terminated())
{
return false;
}