I always run game loops in a separate thread or separate threads.