3
0
Fork 0
forked from suyu/suyu

CPU_Manager: Correct stopping on SingleCore.

This commit is contained in:
Fernando Sahmkow 2020-03-12 19:55:53 -04:00
parent db68fba4a6
commit 1a5f2e290b

View file

@ -39,9 +39,14 @@ void CpuManager::Initialize() {
void CpuManager::Shutdown() {
running_mode = false;
Pause(false);
for (std::size_t core = 0; core < Core::Hardware::NUM_CPU_CORES; core++) {
core_data[core].host_thread->join();
core_data[core].host_thread.reset();
if (is_multicore) {
for (std::size_t core = 0; core < Core::Hardware::NUM_CPU_CORES; core++) {
core_data[core].host_thread->join();
core_data[core].host_thread.reset();
}
} else {
core_data[0].host_thread->join();
core_data[0].host_thread.reset();
}
}