title: When is a Cocoa callback given controll?
body: <p>I've been searching around the web for an answer to this one, but was unable to find an answer, on the other side I think it's something quite common thus there is a possibility I'm missing some keywords here. Anyhow, the problem is as follows:</p>
  
  <p>When is control given to a callback function in ObjC (iPhone)?</p>
  
  <p>Does it happen after control is given to a high up in the hierarchy class responsible for the runloop? Can it occur in the middle of another function call being executed?</p>
  
  <p>As an example, let's take the <strong>NSURLConnection</strong>, we don't know or can't predict when it's going to call <strong>didReceiveResponse</strong> or the other callback methods, can it be the case that <strong>didReceiveResponse</strong> get's called when I'm in the middle of another function? (highly doubt that but was unable to find information on callbacks wating for the end of the run loop)</p>
  
  <p>Cheers,
  Kaspa   </p>