diff options
| author | Mai M <mathew1800@gmail.com> | 2021-06-23 02:35:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-23 02:35:42 -0400 |
| commit | 20f474b09ab503607fab651342bcee433d117c80 (patch) | |
| tree | e9f506ad8d9a5366065dd83797813a504cbaba3e /src/yuzu/bootmanager.h | |
| parent | c1a9fa9db7c47f0c0947aca86c23d5a0551374bb (diff) | |
| parent | 4009ae1da2360f20721c93cd204eb64c7342eb53 (diff) | |
Merge pull request #6508 from ReinUsesLisp/bootmanager-stop-token
bootmanager: Use std::stop_source for stopping emulation
Diffstat (limited to 'src/yuzu/bootmanager.h')
| -rw-r--r-- | src/yuzu/bootmanager.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h index acfe2bc8c..402dd2ee1 100644 --- a/src/yuzu/bootmanager.h +++ b/src/yuzu/bootmanager.h @@ -89,16 +89,16 @@ public: * Requests for the emulation thread to stop running */ void RequestStop() { - stop_run = true; + stop_source.request_stop(); SetRunning(false); } private: bool exec_step = false; bool running = false; - std::atomic_bool stop_run{false}; + std::stop_source stop_source; std::mutex running_mutex; - std::condition_variable running_cv; + std::condition_variable_any running_cv; Common::Event running_wait{}; std::atomic_bool running_guard{false}; |
