aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_timing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r--src/core/core_timing.cpp7
1 files changed, 6 insertions, 1 deletions
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<s64> 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;