title: Threading with iOS and waiting for function completion
body: <p>I'm calling a function on a thread in my project.</p>
  
  <pre><code> [self performSelectorInBackground:@selector(shortVibration) withObject: nil];
  </code></pre>
  
  <p>It's called in a loop.</p>
  
  <p>I would like for the function to be called on its own thread.</p>
  
  <p>I don't want it to be called at the same time (if this thread Call is in a loop... and it is)</p>
  
  <p>So, I don't want to call my thread function again until the last one is done executing.</p>
  
  <p>How can I do this?</p>