Engine shuts off and gives a signal when the main thread has ended. (the game loop.)