title: How to Wait and Terminate a TThread in Delphi (notifying the user when finished)
body: <p>If an user provides information that is recorded in an excel file then I choose Excel COM to read the data.
  However, as the user can repeat the process to N files and the process can take a while, I decided to move this routines to a separated thread.</p>
  
  <p>Therefore, I need your advice to define how can I do this.</p>
  
  <p>The worker thread cannot be destroyed until there is no more remaining files.
  Inside the thread the data is loaded to a ClientDataSet and at the end is applied to database.</p>
  
  <p>I need somehow notify the user when task is done, so he can decide if he will load another file and execute the thread again or finish the job.</p>
  
  <p><strong>How to properly destroy the thread and notify the user?</strong> <br></p>