SaveStates: Fix Gem Thread Reboot

This commit is contained in:
Elad 2025-10-12 09:36:50 +03:00
parent a5b5ac1ed5
commit 6b556ca5b0
6 changed files with 28 additions and 6 deletions

View file

@ -465,6 +465,8 @@ public:
namespace stx
{
struct launch_retainer;
extern atomic_t<u32> g_launch_retainer;
}
// Derived from the callable object Context, possibly a lambda
@ -481,6 +483,11 @@ class named_thread final : public Context, result_storage<Context>, thread_base
u64 entry_point2()
{
while (u32 value = stx::g_launch_retainer)
{
stx::g_launch_retainer.wait(value);
}
thread::initialize([]()
{
if constexpr (!result::empty)