title: dispatch_async and calling a completion handler on the original queue
body: <p>I've seen some related questions but none seem to answer this case. I want to write a method that will do some work in the background. I need this method to call a completion callback on the same thread / queue used for the original method call.</p>
  
  <pre><code>- (void)someMethod:(void (^)(BOOL result))completionHandler {
      dispatch_queue_t current_queue = // ???
  
      // some setup code here
      dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
          BOOL ok = // some result
  
          // do some long running processing here
  
          dispatch_async(current_queue, ^{
              completionHandler(ok);
          });
      });
  </code></pre>
  
  <p>What magic incantation is needed here so the completion handler is called on the same queue or thread as the call to <code>sameMethod</code>? I don't want to assume the main thread. And of course <code>dispatch_get_current_queue</code> is not to be used.</p>