Wait for all the threads to actually finish before exiting Fixes https://github.com/libsdl-org/SDL/issues/5748