Implemented the Cancel button when a sorting thread starts, and kills the thread when clicked.