I have a task class that uses a timer to allow the thread to update the UI via a main-thread method. I was finding, however, that if the last thing the thread was doing was such an action, the UI didn’t get this final update. So I added:
at the end of the task to take care of that. Am I right in thinking that the thread termination sequence kills off any pending events? If so, is there a way to wait for all pending events to complete? I did wonder about:
me.sleep (10000, true)
(provided I’m not waiting for network-related events).
Also: if I want to give up early in a thread, what is the recommended way to do that? Just use
return, or perhaps