More generally, given a procedure that has both a synchronous and asynchronous version (like the NSURLConnection), is there any real difference between “wrapping” the synchronous version in a dispatch_async block like so:
dispatch_async(operationQueue,
^{ [Class doSyncOperation];
});
and just calling the asynchronous version of the same operation?
The asynchronous version of API’s often offers additional information and possibly optimizations. The asynchronous version of
NSUrlConnectionfor example has various callbacks for events such as receiving a response, receiving data, failures and success which allows for greater customization of your code. An example would being able to create a progress bar by use the async version ofNSURLConnection. If you do not need an any additional information usingdispatch_asyncwill work, but you need to be sure that what you are calling uses thread confinement, and you may also lose any threading optimization provided by the library if any.