title: What queue should delegate code run on
body: <p>Suppose you have an object that does some work internally on a private dispatch queue (think thread for those not familiar with GCD).  This object notifies its delegate at various times throughout the work its doing.  It is a bad idea to call the delegate methods from the private queue the code is currently running on, or should they be called on a more well-known queue?  If the latter, what queue? It seems like main queue may not always be what you want.  </p>
  
  <p><strong>Option A</strong></p>
  
  <pre><code>dispatch_async(private_queue, ^{
      // Do some work...
      [self.delegate tellItWorkWasDone:self];
  });
  </code></pre>
  
  <p><strong>Option B</strong> </p>
  
  <pre><code>dispatch_async(private_queue, ^{
      // Do some work...
      dispatch_sync(dispatch_get_main_queue(), ^{
          [self.delegate tellItWorkWasDone:self];
      });
  });
  </code></pre>
  
  <p>Option A has the benefit that its simple, but the drawback that whoever implements the delegate method will be running code on a queue they really shouldn't be on. Option B is probably safer, but main_queue is just an example; how should the two really decide on what queue they should use?</p>
  
  <p>Thanks</p>