title: Delphi : How to create and use Thread locally?
body: <p>My database is in a VPS and I should get some query from my tables</p>
  
  <p>Because of getting query from server taking long time ( depending on Internet speed ! ) , I want to use threads to get queries</p>
  
  <p>Now I create a thread and get query and then send result to my forms with sending and handling messages</p>
  
  <p>I want to know is it possible to create and use a thread locally ?!?</p>
  
  <p>My mean is :</p>
  
  <pre><code>procedure Requery;
  var
   ...
  begin
   Create Thread;
   ...
  
   Pass my Query Component to Thread
   ...
  
   Getting Query in Thread;
   ...
  
   Terminate and Free Thread
   ...
  
   Do next jobs with Query;
   ...
  
  end;
  </code></pre>
  
  <p>The main part is last part ( Do next jobs ... ) , I dont want to use query result in a message handler and I want to use them in the same procedure and after thread job</p>
  
  <p>Is it possible ?!</p>
  
  <p>I think this is not possible with Delphi TThread class and I should use other threading techniques ...</p>
  
  <ul>
  <li>I`m using Delphi XE6</li>
  </ul>