You can look at Tk::ExecuteCommand for ideas on handling long-running processes.
converter
In reply to Re: Tk buttons: Run/Cancel by converter in thread Tk buttons: Run/Cancel by gri6507