|
|
@ -58,7 +58,7 @@ public: |
|
|
* @return True if the emulation thread is running, otherwise false |
|
|
* @return True if the emulation thread is running, otherwise false |
|
|
* @note This function is thread-safe |
|
|
* @note This function is thread-safe |
|
|
*/ |
|
|
*/ |
|
|
bool IsRunning() { |
|
|
|
|
|
|
|
|
bool IsRunning() const { |
|
|
return running; |
|
|
return running; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -68,12 +68,12 @@ public: |
|
|
void RequestStop() { |
|
|
void RequestStop() { |
|
|
stop_run = true; |
|
|
stop_run = true; |
|
|
SetRunning(false); |
|
|
SetRunning(false); |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private: |
|
|
private: |
|
|
bool exec_step; |
|
|
|
|
|
bool running; |
|
|
|
|
|
std::atomic<bool> stop_run; |
|
|
|
|
|
|
|
|
bool exec_step = false; |
|
|
|
|
|
bool running = false; |
|
|
|
|
|
std::atomic<bool> stop_run{false}; |
|
|
std::mutex running_mutex; |
|
|
std::mutex running_mutex; |
|
|
std::condition_variable running_cv; |
|
|
std::condition_variable running_cv; |
|
|
|
|
|
|
|
|
|