in reply to MainLoop control

Try these comments:
Re: Perl Tk GUI locking
How to not wait for a thread.

Software speaks in tongues of man; I debug, therefore I code.