There really isn't a great way to do this by default. I suppose you could write some pretty barbaric sleep()-based timing system to manage all the tasks, but that is neither elegant nor efficient.
Asynchronous event driven programming works <3
Imagine writing a GUI application where you couldn't refresh an animated object AND click a button at the same time.
Most GUI API's (IE: QT, GTK) are event driven. However, yes you're right most of them sit on a very tiny thread pool (typically 2-3 threads that are constantly re-used and repurposed because thread allocation is expensive)
"If art interprets our dreams, the computer executes them in the guise of programs!" - SICP
“If at first, the idea is not absurd, then there is no hope for it” - Albert Einstein