Move the execution of the stopEmulation completion handler to the end of the background thread.