Merge pull request #2396 from Sonicadvance1/fix_racing_cpu_core Fix a race condition when pausing the CPU core.