Well, my game is turn-based. On my PC, the functions complete fairly quickly, but on my phone, they can be very slow. So what I wanted to do was to disable any buttons, put up a 'Please wait' message, run the processing functions, then remove the message and re-enable the buttons.
So I guess my misunderstanding is in thinking that if the function takes a while (say 1 second) to complete, the whole game locks up while it's processing (actually, I've noticed that sprites stop moving etc in tests when I do this). But what you're saying is, even if the function takes a second to complete, the rest of the program continues to process? So how does the function process, is it processing in the background on a thread?
To solve my problem, how do I know when the function has completed processing, so that I can remove my message and restart the next turn?
I have capx to demonstrate but not sure how to post it.