title: Multithreading and error handling in Vb.net
body: <p>This Question has 2 parts. I am new to multithreading and so I want to firstly check if my logic is correct and then I want to find out how to handel erros in multithreading.
  Q1: I have an application that calls SQL database obtaining information from 2 datatables, this info is then combined in a final display. Without multithreading, I call each SQL select to populate a dataset one after the other. With multithreading I call the more complex SQL first as a separate thread and then the less complex SQL call in the main thread second. I am trying to cut down the load time of both by doing them concurently.
  (I realise that strictly I should do both as backround tasks to free up the UI, for me its small steps first) 
  Anyway the code looks little like this</p>
  
  <pre><code> Dim ThreadLoad_Longer_Data As Thread
      ThreadLoad_Longer_Data = New Thread(AddressOf Me.Fill_LongerSQL)
  
          ThreadLoad_Longer_Data.IsBackground = True
          TThreadLoad_Longer_Data.Start()
  
     'Execute some code here for the second SQL call in main thread
  
     'Then stop the main prosess to wait for the finish of the of the background
          ThreadLoad_Longer_Data.join
  </code></pre>
  
  <p>Im assuming that the .Join statment will infact stop the main thread and will wait for the other one to finish ? Is this correct ?
  If so it brings me to the second part.
  Q2. What happens if the first thread dosent finish? Like through an error ? How do I handle this situation ?</p>
  
  <p>Thank you </p>