mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 03:25:46 +00:00
bootmanager: Use std::stop_source for stopping emulation
Use its std::stop_token to abort shader cache loading. Using std::stop_token instead of std::atomic_bool allows the usage of other utilities like std::stop_callback.
This commit is contained in:
parent
3fb11c6e77
commit
2b175430fd
8 changed files with 18 additions and 18 deletions
|
@ -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};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue