sys_config: Move cleanup to IDM abort

This commit is contained in:
Elad 2024-12-23 15:13:14 +02:00
parent 4d0c835df3
commit 3bf735161f
4 changed files with 47 additions and 9 deletions

View file

@ -693,7 +693,7 @@ public:
if constexpr (std::is_assignable_v<Context&, thread_state>)
{
static_cast<Context&>(*this) = s;
static_cast<Context&>(*this) = thread_state::aborting;
}
if (notify_sync)
@ -706,6 +706,11 @@ public:
{
// This participates in emulation stopping, use destruction-alike semantics
thread::join(true);
if constexpr (std::is_assignable_v<Context&, thread_state>)
{
static_cast<Context&>(*this) = thread_state::finished;
}
}
return *this;