So when using dispatch_async ...
Say you're making a network connection for example...
dispatch_queue_t otherQ = dispatch_queue_create(NULL, 0);
__weak MyClass *myself = self;
dispatch_async(otherQ,
^{
myself.searchResultsRA = [myself dataFrom:happyUrl ifError:nil];
dispatch_async(dispatch_get_main_queue(), ^{ if (after) after(); });
});
dispatch_release(otherQ);
Notice I am creating a queue "right there" for that call.
So, every call like that in the app, simply creates its own queue "there and then" to use.
Alternately, you can just create one queue as a global for your app, and keep it around, and always use that one same queue. (I guess, you'd really "never release it" it would just persist for the life of the app.)
(Note - I am not talking about Apple's "global queue" ..dispatch_get_global_queue .. nothing to do with that .. I simply mean you can create your own one queue and always use that same queue.)
I've never really understood if one approach is preferred or if there are dangers associated with either, or any other issues.
In short, which approach to use?