title: Calling an AsyncTask twice behavior
body: <p>I am trying to implement a search bar that automatically searches as you type.</p>
  
  <p>My idea is to have an <code>AsyncTask</code> which fetches the search data from the server, but I can't figure how exactly <code>AsyncTask</code> will behave with my use of it.</p>
  
  <p>Let's say I have <code>SearchAsyncTask</code>.</p>
  
  <p>Every time the text field is edited I will call</p>
  
  <pre><code>new SearchAsyncTask().execute(params);
  </code></pre>
  
  <p>So here's my question: what will the behavior of this be? Will I be starting many different threads which will all return and call <code>onPostExecute()</code>? Or will the first task called be stopped mid-task if another instance is called while it's still working? Or something totally different?</p>
  
  <p>What if I write it this way?</p>
  
  <pre><code>SearchAsyncTask a = new SearchAsyncTask().execute(params);
  ...
  a.execute(params2);
  a.execute(params3);
  ...
  </code></pre>