From b937805eb573cbad52fc698fd149752eae0ddc81 Mon Sep 17 00:00:00 2001 From: Takoroka <137927095+Takoroka@users.noreply.github.com> Date: Fri, 30 Oct 2026 00:53:47 -0400 Subject: core_timing: request the timer thread's stop before waking it CoreTiming::Reset set pause_event and event, and only then requested the stop. The woken timer thread could take the wake-up, still see no stop request, and go back to waiting on pause_event for good; the join that follows then hung the frontend while booting a game ("Not Responding", main thread in CoreTiming::Reset -> std::thread::join). Request the stop first, so the thread sees it whenever it wakes. --- src/core/core_timing.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/core/core_timing.cpp') diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index d2ee6769cc..b85bd30a58 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -304,10 +304,15 @@ std::optional CoreTiming::Advance() { void CoreTiming::Reset() { paused = true; + // Request the stop before waking the thread: woken first, it could take the wake-up, see no + // stop request yet, and go back to waiting on pause_event for good (the join below then hung + // the frontend at boot). + if (timer_thread.joinable()) { + timer_thread.request_stop(); + } pause_event.Set(); event.Set(); if (timer_thread.joinable()) { - timer_thread.request_stop(); timer_thread.join(); } has_started = false; -- cgit v1.2.3