Although in some contexts it is nice to have have another thread for this, you do not need a second thread.
You can get away with using only one thread:
- create some kind of graphical animation looping mechanism, based on "time" (e.g. the looping "loading" animation has 8 frames, make this loop 2 times per second, this will make it 16 fps, )
- allow this looping mechanism to fire the rendering of the screen
- when you start loading, cover up the screen with whatever "loading" image you want, and display your "looping/loading" animation
- then periodically, when you load stuff, poke the "looping/loading" animation mechanism; if the previous poke occurred in the last 1/16th of a second, no need to re-render, if it occurred earlier than this, check how long it's been and display the appropriate animation frame.
This method has the advantage that, well, it's single threaded, so you know exactly what happens when it happens, but it has the inconvenience that the loading/looping animation may not be as smooth as it could be as it could sometimes skip frames, and you have to change the code that loads stuff to allow the poking.