This will give the user the option to cancel execution at any time. This has to stop the worker thread and clean the execution.